Commit 9ada0bf0 authored by Javad Rahmatzadeh's avatar Javad Rahmatzadeh
Browse files

alt tab icon size

parent e996fcaf
......@@ -22,6 +22,7 @@ We go to the next version after each release on [GNOME Shell Extensions website]
### Added
- Alt Tab window preview size.
- Alt Tab icon size.
- Dash separator visibility.
- Looking glass size by [@AdvendraDeswanta](https://gitlab.gnome.org/AdvendraDeswanta).
- OSD position.
......
......@@ -11,6 +11,7 @@ This extension allows you to do the following:
| Accessibility Menu Visibility | :black_circle: | :black_circle: | :black_circle: | :black_circle: | :black_circle: |
| Activities Button Icon Visibility | :black_circle: | :black_circle: | :black_circle: | :black_circle: | :black_circle: |
| Activities button Visibility | :black_circle: | :black_circle: | :black_circle: | :black_circle: | :black_circle: |
| Alt Tab Icon Size | :black_circle: | :black_circle: | :black_circle: | :black_circle: | :black_circle: |
| Alt Tab Window Preview Size | :black_circle: | :black_circle: | :black_circle: | :black_circle: | :black_circle: |
| Always Show Workspace Switcher on Dynamic Workspaces | :white_circle: | :white_circle: | :black_circle: | :black_circle: | :black_circle: |
| Animation Speed or Disable it | :black_circle: | :black_circle: | :black_circle: | :black_circle: | :black_circle: |
......
......@@ -269,6 +269,10 @@ var Manager = class
this._settings.connect('changed::alt-tab-window-preview-size', () => {
this._applyAltTabWindowPreviewSize(false);
});
this._settings.connect('changed::alt-tab-icon-size', () => {
this._applyAltTabIconSize(false);
});
}
/**
......@@ -332,6 +336,7 @@ var Manager = class
this._applyOSDPosition(false);
this._applyWindowMenuTakeScreenshotButton(false);
this._applyAltTabWindowPreviewSize(false);
this._applyAltTabIconSize(false);
}
/**
......@@ -395,6 +400,7 @@ var Manager = class
this._applyOSDPosition(true);
this._applyWindowMenuTakeScreenshotButton(true);
this._applyAltTabWindowPreviewSize(true);
this._applyAltTabIconSize(true);
}
/**
......@@ -1367,5 +1373,23 @@ var Manager = class
this._api.altTabWindowPreviewSetSize(size);
}
}
/**
* apply alt tab icon size settings
*
* @param {boolean} forceOriginal force original shell setting
*
* @returns {void}
*/
_applyAltTabIconSize(forceOriginal)
{
let size = this._settings.get_int('alt-tab-icon-size');
if (forceOriginal || size === 0) {
this._api.altTabIconSetDefaultSize();
} else {
this._api.altTabIconSetSize(size);
}
}
}
......@@ -748,6 +748,26 @@ var PrefsKeys = class
}
);
this.setKey(
'customize',
'alt-tab-icon-size',
'GtkComboBoxText',
true,
{
default: 0,
minimal: 0,
superminimal: 0,
},
{
'0': 0,
'1': 32,
'2': 64,
'3': 128,
'4': 256,
'5': 512,
}
);
this.setKey(
'override',
'theme',
......
......@@ -376,6 +376,13 @@
<description>Alt Tab Window Preview Size</description>
</key>
<key type="i" name="alt-tab-icon-size">
<default>0</default>
<range min="0" max="512"/>
<summary>0 means default size</summary>
<description>Alt Tab Icon Size</description>
</key>
</schema>
</schemalist>
......@@ -117,6 +117,13 @@
<property name="model">alt_tab_window_preview_size_model</property>
</object>
</child>
<child>
<object class="AdwComboRow" id="alt_tab_icon_size_row">
<property name="title" translatable="yes">Alt Tab Icon Size</property>
<property name="model">alt_tab_icon_size_model</property>
</object>
</child>
<child>
<object class="AdwComboRow" id="looking_glass_width_row">
......@@ -663,6 +670,17 @@
</items>
</object>
<object class="GtkStringList" id="alt_tab_icon_size_model">
<items>
<item translatable="yes">Default</item>
<item>32</item>
<item>64</item>
<item>128</item>
<item>256</item>
<item>512</item>
</items>
</object>
<object class="GtkStringList" id="looking_glass_width_model">
<items>
<item translatable="yes">Default</item>
......
......@@ -1339,6 +1339,63 @@
</object>
</child>
<child>
<object class="GtkListBoxRow" id="alt_tab_icon_size_row">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<object class="GtkBox" id="alt_tab_icon_size_box">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<property name="margin-top">12</property>
<property name="margin-bottom">12</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="alt_tab_icon_size_box2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">32</property>
<child>
<object class="GtkLabel" id="alt_tab_icon_size_txt">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">center</property>
<property name="label" translatable="yes">Alt Tab Icon Size</property>
<property name="xalign">0</property>
<property name="hexpand">1</property>
</object>
</child>
<child>
<object class="GtkComboBoxText" id="alt_tab_icon_size_comboboxtext">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
<items>
<item translatable="yes">Default</item>
<item>32</item>
<item>64</item>
<item>128</item>
<item>256</item>
<item>512</item>
</items>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow" id="looking_glass_width_row">
<property name="visible">True</property>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment