Commit 5864a1fd authored by Javad Rahmatzadeh's avatar Javad Rahmatzadeh
Browse files

alt tab window preview icon size

parent 69155678
......@@ -21,6 +21,7 @@ We go to the next version after each release on [GNOME Shell Extensions website]
### Added
- Alt Tab window preview icon size.
- Alt Tab window preview size.
- Alt Tab icon size.
- Dash separator visibility.
......
......@@ -12,6 +12,7 @@ This extension allows you to do the following:
| 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 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: |
......
......@@ -3192,11 +3192,11 @@ var API = class
}
/**
* set default alt tab window preview icon size
* set default alt tab small icon size
*
* @returns {void}
*/
altTabWindowPreviewIconSetDefaultSize()
altTabSmallIconSetDefaultSize()
{
if (!this._originals['altTabAppIconSizeSmall']) {
return;
......@@ -3206,13 +3206,13 @@ var API = class
}
/**
* set alt tab window preview icon size
* set alt tab small icon size
*
* @param {number} size 1-512
*
* @returns {void}
*/
altTabWindowPreviewIconSetSize(size)
altTabSmallIconSetSize(size)
{
if (size < 1 || size > 512) {
return;
......
......@@ -270,6 +270,10 @@ var Manager = class
this._applyAltTabWindowPreviewSize(false);
});
this._settings.connect('changed::alt-tab-small-icon-size', () => {
this._applyAltTabSmallIconSize(false);
});
this._settings.connect('changed::alt-tab-icon-size', () => {
this._applyAltTabIconSize(false);
});
......@@ -336,6 +340,7 @@ var Manager = class
this._applyOSDPosition(false);
this._applyWindowMenuTakeScreenshotButton(false);
this._applyAltTabWindowPreviewSize(false);
this._applyAltTabSmallIconSize(false);
this._applyAltTabIconSize(false);
}
......@@ -400,6 +405,7 @@ var Manager = class
this._applyOSDPosition(true);
this._applyWindowMenuTakeScreenshotButton(true);
this._applyAltTabWindowPreviewSize(true);
this._applyAltTabSmallIconSize(true);
this._applyAltTabIconSize(true);
}
......@@ -1374,6 +1380,24 @@ var Manager = class
}
}
/**
* apply alt tab small icon size settings
*
* @param {boolean} forceOriginal force original shell setting
*
* @returns {void}
*/
_applyAltTabSmallIconSize(forceOriginal)
{
let size = this._settings.get_int('alt-tab-small-icon-size');
if (forceOriginal || size === 0) {
this._api.altTabSmallIconSetDefaultSize();
} else {
this._api.altTabSmallIconSetSize(size);
}
}
/**
* apply alt tab icon size settings
*
......
......@@ -748,6 +748,26 @@ var PrefsKeys = class
}
);
this.setKey(
'customize',
'alt-tab-small-icon-size',
'GtkComboBoxText',
true,
{
default: 0,
minimal: 0,
superminimal: 0,
},
{
'0': 0,
'1': 32,
'2': 64,
'3': 128,
'4': 256,
'5': 512,
}
);
this.setKey(
'customize',
'alt-tab-icon-size',
......
......@@ -362,7 +362,7 @@
<summary>OSD Position</summary>
<description>OSD Position Status</description>
</key>
<key type="b" name="window-menu-take-screenshot-button">
<default>true</default>
<summary>Window Menu Take Screenshot Button Visibility</summary>
......@@ -375,14 +375,21 @@
<summary>0 means default size</summary>
<description>Alt Tab Window Preview Size</description>
</key>
<key type="i" name="alt-tab-small-icon-size">
<default>0</default>
<range min="0" max="512"/>
<summary>0 means default size</summary>
<description>Alt Tab Small Icon Size (Window Preview Icon 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,7 +117,14 @@
<property name="model">alt_tab_window_preview_size_model</property>
</object>
</child>
<child>
<object class="AdwComboRow" id="alt_tab_small_icon_size_row">
<property name="title" translatable="yes">Alt Tab Window Preview Icon Size</property>
<property name="model">alt_tab_small_icon_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>
......@@ -670,6 +677,17 @@
</items>
</object>
<object class="GtkStringList" id="alt_tab_small_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="alt_tab_icon_size_model">
<items>
<item translatable="yes">Default</item>
......
......@@ -1338,6 +1338,63 @@
</object>
</child>
<child>
<object class="GtkListBoxRow" id="alt_tab_small_icon_size_row">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<object class="GtkBox" id="alt_tab_small_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_small_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_small_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 Window Preview Icon Size</property>
<property name="xalign">0</property>
<property name="hexpand">1</property>
</object>
</child>
<child>
<object class="GtkComboBoxText" id="alt_tab_small_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="alt_tab_icon_size_row">
......
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