mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-13 15:54:12 +09:00
4
Makefile
4
Makefile
@@ -16,7 +16,7 @@ INSTALLNAME = dash-to-panel@jderose9.github.com
|
||||
|
||||
# The command line passed variable VERSION is used to set the version string
|
||||
# in the metadata and in the generated zip-file. If no VERSION is passed, the
|
||||
# version is pulled from the latest git tag and the current commit SHA1 is
|
||||
# version is pulled from the latest git tag and the current commit SHA1 is
|
||||
# added to the metadata
|
||||
ifdef VERSION
|
||||
ifdef TARGET
|
||||
@@ -51,7 +51,7 @@ mergepo: potfile
|
||||
./po/dash-to-panel.pot: $(TOLOCALIZE)
|
||||
mkdir -p po
|
||||
xgettext -k_ -kN_ -o po/dash-to-panel.pot --package-name "Dash To Panel" $(TOLOCALIZE) --from-code=UTF-8
|
||||
|
||||
|
||||
for l in $(UI_MODULES) ; do \
|
||||
intltool-extract --type=gettext/glade $$l; \
|
||||
xgettext -k_ -kN_ -o po/dash-to-panel.pot $$l.h --join-existing --from-code=UTF-8; \
|
||||
|
||||
508
appIcons.js
508
appIcons.js
File diff suppressed because it is too large
Load Diff
120
panel.js
120
panel.js
@@ -17,13 +17,13 @@
|
||||
* Credits:
|
||||
* This file is based on code from the Dash to Dock extension by micheleg
|
||||
* and code from the Taskbar extension by Zorin OS
|
||||
*
|
||||
*
|
||||
* Code to re-anchor the panel was taken from Thoma5 BottomPanel:
|
||||
* https://github.com/Thoma5/gnome-shell-extension-bottompanel
|
||||
*
|
||||
*
|
||||
* Pattern for moving clock based on Frippery Move Clock by R M Yorston
|
||||
* http://frippery.org/extensions/
|
||||
*
|
||||
*
|
||||
* Some code was also adapted from the upstream Gnome Shell source code.
|
||||
*/
|
||||
|
||||
@@ -85,7 +85,7 @@ export const Panel = GObject.registerClass({
|
||||
// so in this case use isPrimary to get the panel on the primary dtp monitor, which
|
||||
// might be different from the system's primary monitor.
|
||||
this.isStandalone = isStandalone;
|
||||
this.isPrimary = !isStandalone || (SETTINGS.get_boolean('stockgs-keep-top-panel') &&
|
||||
this.isPrimary = !isStandalone || (SETTINGS.get_boolean('stockgs-keep-top-panel') &&
|
||||
monitor == panelManager.dtpPrimaryMonitor);
|
||||
|
||||
this._sessionStyle = null;
|
||||
@@ -144,20 +144,20 @@ export const Panel = GObject.registerClass({
|
||||
});
|
||||
}
|
||||
|
||||
// Create a wrapper around the real showAppsIcon in order to add a popupMenu. Most of
|
||||
// Create a wrapper around the real showAppsIcon in order to add a popupMenu. Most of
|
||||
// its behavior is handled by the taskbar, but its positioning is done at the panel level
|
||||
this.showAppsIconWrapper = new AppIcons.ShowAppsIconWrapper(this);
|
||||
this.panel.add_child(this.showAppsIconWrapper.realShowAppsIcon);
|
||||
|
||||
this.panel._delegate = this;
|
||||
|
||||
|
||||
this.add_child(this.panel);
|
||||
|
||||
if (Main.panel._onButtonPress || Main.panel._tryDragWindow) {
|
||||
this._signalsHandler.add([
|
||||
this.panel,
|
||||
this.panel,
|
||||
[
|
||||
'button-press-event',
|
||||
'button-press-event',
|
||||
'touch-event'
|
||||
],
|
||||
this._onButtonPress.bind(this)
|
||||
@@ -167,7 +167,7 @@ export const Panel = GObject.registerClass({
|
||||
if (Main.panel._onKeyPress) {
|
||||
this._signalsHandler.add([this.panel, 'key-press-event', Main.panel._onKeyPress.bind(this)]);
|
||||
}
|
||||
|
||||
|
||||
Main.ctrlAltTabManager.addGroup(this, _("Top Bar")+" "+ monitor.index, 'focus-top-bar-symbolic',
|
||||
{ sortGroup: CtrlAltTab.SortGroup.TOP });
|
||||
}
|
||||
@@ -180,7 +180,7 @@ export const Panel = GObject.registerClass({
|
||||
}
|
||||
|
||||
this.geom = this.getGeometry();
|
||||
|
||||
|
||||
this._setPanelPosition();
|
||||
|
||||
if (!this.isStandalone) {
|
||||
@@ -209,13 +209,13 @@ export const Panel = GObject.registerClass({
|
||||
};
|
||||
|
||||
this.dynamicTransparency = new Transparency.DynamicTransparency(this);
|
||||
|
||||
|
||||
this.taskbar = new Taskbar.Taskbar(this);
|
||||
|
||||
this.panel.add_child(this.taskbar.actor);
|
||||
|
||||
this._setShowDesktopButton(true);
|
||||
|
||||
|
||||
this._setAllocationMap();
|
||||
|
||||
this.panel.add_style_class_name('dashtopanelMainPanel ' + this.getOrientation());
|
||||
@@ -225,14 +225,14 @@ export const Panel = GObject.registerClass({
|
||||
this._signalsHandler.add(
|
||||
// this is to catch changes to the theme or window scale factor
|
||||
[
|
||||
Utils.getStageTheme(),
|
||||
'changed',
|
||||
Utils.getStageTheme(),
|
||||
'changed',
|
||||
() => (this._resetGeometry(), this._setShowDesktopButtonStyle()),
|
||||
],
|
||||
[
|
||||
// sync hover after a popupmenu is closed
|
||||
this.taskbar,
|
||||
'menu-closed',
|
||||
'menu-closed',
|
||||
() => this.panel.sync_hover()
|
||||
],
|
||||
[
|
||||
@@ -255,10 +255,10 @@ export const Panel = GObject.registerClass({
|
||||
],
|
||||
[
|
||||
this.statusArea.activities,
|
||||
'captured-event',
|
||||
'captured-event',
|
||||
(actor, e) => {
|
||||
if (e.type() == Clutter.EventType.BUTTON_PRESS || e.type() == Clutter.EventType.TOUCH_BEGIN) {
|
||||
//temporarily use as primary the monitor on which the activities btn was clicked
|
||||
//temporarily use as primary the monitor on which the activities btn was clicked
|
||||
this.panelManager.setFocusedMonitor(this.monitor);
|
||||
}
|
||||
}
|
||||
@@ -302,7 +302,7 @@ export const Panel = GObject.registerClass({
|
||||
|
||||
if (this.statusArea.dateMenu) {
|
||||
this._formatVerticalClock();
|
||||
|
||||
|
||||
this._signalsHandler.add([
|
||||
this.statusArea.dateMenu._clock,
|
||||
'notify::clock',
|
||||
@@ -324,7 +324,7 @@ export const Panel = GObject.registerClass({
|
||||
|
||||
this._timeoutsHandler.destroy();
|
||||
this._signalsHandler.destroy();
|
||||
|
||||
|
||||
this.panel.remove_child(this.taskbar.actor);
|
||||
|
||||
if (this.intellihide) {
|
||||
@@ -366,14 +366,14 @@ export const Panel = GObject.registerClass({
|
||||
['activities', systemMenuName, 'dateMenu'].forEach(b => {
|
||||
let container = this.statusArea[b].container;
|
||||
let originalParent = container._dtpOriginalParent;
|
||||
|
||||
|
||||
this.panel.remove_child(container);
|
||||
|
||||
originalParent && originalParent.insert_child_at_index(
|
||||
container,
|
||||
container,
|
||||
Math.min(container._dtpOriginalIndex, originalParent.get_children().length - 1)
|
||||
);
|
||||
|
||||
|
||||
delete container._dtpOriginalParent;
|
||||
delete container._dtpOriginalIndex;
|
||||
});
|
||||
@@ -384,7 +384,7 @@ export const Panel = GObject.registerClass({
|
||||
delete Utils.getIndicators(this.statusArea[systemMenuName]._volumeOutput)._dtpIgnoreScroll;
|
||||
|
||||
this._injectionManager.clear();
|
||||
|
||||
|
||||
this.panel._delegate = this.panel;
|
||||
} else {
|
||||
this._removePanelMenu('dateMenu');
|
||||
@@ -405,16 +405,16 @@ export const Panel = GObject.registerClass({
|
||||
} else if (position == Pos.BOTTOM) {
|
||||
return St.Side.BOTTOM;
|
||||
}
|
||||
|
||||
|
||||
return St.Side.LEFT;
|
||||
}
|
||||
|
||||
checkIfVertical() {
|
||||
let position = this.getPosition();
|
||||
|
||||
|
||||
return (position == St.Side.LEFT || position == St.Side.RIGHT);
|
||||
}
|
||||
|
||||
|
||||
getOrientation() {
|
||||
return (this.checkIfVertical() ? 'vertical' : 'horizontal');
|
||||
}
|
||||
@@ -452,7 +452,7 @@ export const Panel = GObject.registerClass({
|
||||
currentPosition = Pos.STACKED_BR;
|
||||
}
|
||||
|
||||
if (!previousPosition ||
|
||||
if (!previousPosition ||
|
||||
(previousPosition == Pos.STACKED_TL && currentPosition != Pos.STACKED_TL) ||
|
||||
(previousPosition != Pos.STACKED_BR && currentPosition == Pos.STACKED_BR) ||
|
||||
(isCentered && previousPosition != currentPosition && previousPosition != Pos.STACKED_BR)) {
|
||||
@@ -486,6 +486,8 @@ export const Panel = GObject.registerClass({
|
||||
SETTINGS,
|
||||
[
|
||||
'changed::panel-sizes',
|
||||
'changed::appicon-margin-todesktop',
|
||||
'changed::appicon-margin-toscreenborder',
|
||||
'changed::group-apps'
|
||||
],
|
||||
() => this._resetGeometry()
|
||||
@@ -514,7 +516,7 @@ export const Panel = GObject.registerClass({
|
||||
'changed::clock-format',
|
||||
() => {
|
||||
this._clockFormat = null;
|
||||
|
||||
|
||||
if (isVertical) {
|
||||
this._formatVerticalClock();
|
||||
}
|
||||
@@ -544,7 +546,7 @@ export const Panel = GObject.registerClass({
|
||||
container.insert_child_at_index(this.statusArea[propName].container, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_removePanelMenu(propName) {
|
||||
if (this.statusArea[propName]) {
|
||||
let parent = this.statusArea[propName].container.get_parent();
|
||||
@@ -555,8 +557,8 @@ export const Panel = GObject.registerClass({
|
||||
|
||||
//calling this.statusArea[propName].destroy(); is buggy for now, gnome-shell never
|
||||
//destroys those panel menus...
|
||||
//since we can't destroy the menu (hence properly disconnect its signals), let's
|
||||
//store it so the next time a panel needs one of its kind, we can reuse it instead
|
||||
//since we can't destroy the menu (hence properly disconnect its signals), let's
|
||||
//store it so the next time a panel needs one of its kind, we can reuse it instead
|
||||
//of creating a new one
|
||||
let panelMenu = this.statusArea[propName];
|
||||
|
||||
@@ -619,7 +621,7 @@ export const Panel = GObject.registerClass({
|
||||
let x = 0, y = 0;
|
||||
let w = 0, h = 0;
|
||||
|
||||
const panelSize = PanelSettings.getPanelSize(SETTINGS, this.monitor.index);
|
||||
const panelSize = PanelSettings.getPanelSize(SETTINGS, this.monitor.index) + SETTINGS.get_int('appicon-margin-todesktop') + SETTINGS.get_int('appicon-margin-toscreenborder');
|
||||
this.dtpSize = panelSize * scaleFactor;
|
||||
|
||||
if (SETTINGS.get_boolean('stockgs-keep-top-panel') && Main.layoutManager.primaryMonitor == this.monitor) {
|
||||
@@ -660,7 +662,7 @@ export const Panel = GObject.registerClass({
|
||||
|
||||
if (this.checkIfVertical()) {
|
||||
let viewHeight = this.monitor.height - gsTopPanelOffset;
|
||||
|
||||
|
||||
if (anchor === Pos.MIDDLE) {
|
||||
anchorPlaceOnMonitor = (viewHeight - h) / 2;
|
||||
} else if (anchor === Pos.END) {
|
||||
@@ -681,7 +683,7 @@ export const Panel = GObject.registerClass({
|
||||
}
|
||||
|
||||
return {
|
||||
x, y,
|
||||
x, y,
|
||||
w, h,
|
||||
lrPadding,
|
||||
tbPadding,
|
||||
@@ -691,11 +693,11 @@ export const Panel = GObject.registerClass({
|
||||
|
||||
_setAllocationMap() {
|
||||
this.allocationMap = {};
|
||||
let setMap = (name, actor) => this.allocationMap[name] = {
|
||||
let setMap = (name, actor) => this.allocationMap[name] = {
|
||||
actor: actor,
|
||||
box: new Clutter.ActorBox()
|
||||
box: new Clutter.ActorBox()
|
||||
};
|
||||
|
||||
|
||||
setMap(Pos.SHOW_APPS_BTN, this.showAppsIconWrapper.realShowAppsIcon);
|
||||
setMap(Pos.ACTIVITIES_BTN, this.statusArea.activities ? this.statusArea.activities.container : 0);
|
||||
setMap(Pos.LEFT_BOX, this._leftBox);
|
||||
@@ -772,19 +774,19 @@ export const Panel = GObject.registerClass({
|
||||
brSize += refGroup.size;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (group.isCentered) {
|
||||
availableSize -= Math.max(tlSize, brSize) * 2;
|
||||
} else {
|
||||
availableSize -= tlSize + brSize;
|
||||
}
|
||||
|
||||
|
||||
if (availableSize < group.size) {
|
||||
expandable.natSize -= (group.size - availableSize) * (group.isCentered && !Pos.checkIfCentered(expandable.position) ? .5 : 1);
|
||||
assignGroupSize(group, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (group.isCentered) {
|
||||
startPosition = tlLimit + (brLimit - tlLimit - group.size) * .5;
|
||||
} else if (group.position == Pos.STACKED_BR) {
|
||||
@@ -833,9 +835,9 @@ export const Panel = GObject.registerClass({
|
||||
|
||||
let prevGroup = this._elementGroups[i - 1];
|
||||
let nextGroup = this._elementGroups[i + 1];
|
||||
let prevLimit = prevGroup && prevGroup.fixed ? prevGroup[this.varCoord.c2] :
|
||||
let prevLimit = prevGroup && prevGroup.fixed ? prevGroup[this.varCoord.c2] :
|
||||
centeredMonitorGroup && group.index > centeredMonitorGroup.index ? centeredMonitorGroup[this.varCoord.c2] : panelAlloc[this.varCoord.c1];
|
||||
let nextLimit = nextGroup && nextGroup.fixed ? nextGroup[this.varCoord.c1] :
|
||||
let nextLimit = nextGroup && nextGroup.fixed ? nextGroup[this.varCoord.c1] :
|
||||
centeredMonitorGroup && group.index < centeredMonitorGroup.index ? centeredMonitorGroup[this.varCoord.c1] : panelAlloc[this.varCoord.c2];
|
||||
|
||||
if (group.position == Pos.STACKED_TL) {
|
||||
@@ -860,7 +862,7 @@ export const Panel = GObject.registerClass({
|
||||
// styles for theming
|
||||
Object.keys(St.Side).forEach(p => {
|
||||
let cssName = 'dashtopanel' + p.charAt(0) + p.slice(1).toLowerCase();
|
||||
|
||||
|
||||
this.panel[(St.Side[p] == this.geom.position ? 'add' : 'remove') + '_style_class_name'](cssName);
|
||||
});
|
||||
|
||||
@@ -892,7 +894,7 @@ export const Panel = GObject.registerClass({
|
||||
} else {
|
||||
const targetActor = global.stage.get_event_actor(event);
|
||||
|
||||
if (Main.modalCount > 0 || targetActor != actor ||
|
||||
if (Main.modalCount > 0 || targetActor != actor ||
|
||||
(!isPress && type != Clutter.EventType.TOUCH_BEGIN) ||
|
||||
(isPress && button != 1)) {
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
@@ -956,7 +958,7 @@ export const Panel = GObject.registerClass({
|
||||
actor.vertical = isVertical;
|
||||
} else if (
|
||||
actor != this.statusArea.appMenu &&
|
||||
((actor._delegate || actor) instanceof PanelMenu.ButtonBox || actor == this.statusArea.quickSettings)
|
||||
((actor._delegate || actor) instanceof PanelMenu.ButtonBox || actor == this.statusArea.quickSettings)
|
||||
) {
|
||||
let child = actor.get_first_child();
|
||||
|
||||
@@ -983,7 +985,7 @@ export const Panel = GObject.registerClass({
|
||||
};
|
||||
|
||||
_set(actor, false);
|
||||
|
||||
|
||||
if (isVertical)
|
||||
_set(actor, isVertical);
|
||||
}
|
||||
@@ -994,7 +996,7 @@ export const Panel = GObject.registerClass({
|
||||
|
||||
delete actor._dtpVisibleId;
|
||||
delete actor._dtpDestroyId;
|
||||
|
||||
|
||||
this._unmappedButtons.splice(this._unmappedButtons.indexOf(actor), 1);
|
||||
}
|
||||
|
||||
@@ -1008,16 +1010,16 @@ export const Panel = GObject.registerClass({
|
||||
let setClockText = (text, useTimeSeparator) => {
|
||||
let stacks = text instanceof Array;
|
||||
let separator = `\n<span size="8192"> ${useTimeSeparator ? '‧‧' : '—' } </span>\n`;
|
||||
|
||||
|
||||
clockText.set_text((stacks ? text.join(separator) : text).trim());
|
||||
clockText.set_use_markup(stacks);
|
||||
clockText.get_allocation_box();
|
||||
|
||||
|
||||
return !clockText.get_layout().is_ellipsized();
|
||||
};
|
||||
|
||||
if (clockText.ellipsize == Pango.EllipsizeMode.NONE) {
|
||||
//on gnome-shell 3.36.4, the clockdisplay isn't ellipsize anymore, so set it back
|
||||
//on gnome-shell 3.36.4, the clockdisplay isn't ellipsize anymore, so set it back
|
||||
clockText.ellipsize = Pango.EllipsizeMode.END;
|
||||
}
|
||||
|
||||
@@ -1029,8 +1031,8 @@ export const Panel = GObject.registerClass({
|
||||
datetimeParts = [datetimeParts.join(' '), time];
|
||||
}
|
||||
|
||||
if (!setClockText(datetime) &&
|
||||
!setClockText(datetimeParts) &&
|
||||
if (!setClockText(datetime) &&
|
||||
!setClockText(datetimeParts) &&
|
||||
!setClockText(time)) {
|
||||
let timeParts = time.split('∶');
|
||||
|
||||
@@ -1078,7 +1080,7 @@ export const Panel = GObject.registerClass({
|
||||
}]);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this._showDesktopButton.connect('leave-event', () => {
|
||||
this._showDesktopButton.remove_style_class_name(this._getBackgroundBrightness() ?
|
||||
'showdesktop-button-light-hovered' : 'showdesktop-button-dark-hovered');
|
||||
@@ -1136,7 +1138,7 @@ export const Panel = GObject.registerClass({
|
||||
time: time,
|
||||
transition: 'easeOutQuad'
|
||||
};
|
||||
|
||||
|
||||
Utils.animateWindowOpacity(w.get_compositor_private(), tweenOpts);
|
||||
}
|
||||
});
|
||||
@@ -1168,14 +1170,14 @@ export const Panel = GObject.registerClass({
|
||||
windows.forEach(function(w) {
|
||||
w.minimize();
|
||||
});
|
||||
|
||||
|
||||
this._restoreWindowList = windows;
|
||||
|
||||
this._timeoutsHandler.add([T5, 20, () => this._signalsHandler.addWithLabel(
|
||||
label,
|
||||
label,
|
||||
[
|
||||
tracker,
|
||||
'notify::focus-app',
|
||||
tracker,
|
||||
'notify::focus-app',
|
||||
() => this._restoreWindowList = null
|
||||
]
|
||||
)]);
|
||||
@@ -1208,7 +1210,7 @@ export const Panel = GObject.registerClass({
|
||||
showWsPopup ? 0 : Main.wm._workspaceSwitcherPopup = null;
|
||||
} else if (direction && scrollAction === 'CYCLE_WINDOWS') {
|
||||
let windows = this.taskbar.getAppInfos().reduce((ws, appInfo) => ws.concat(appInfo.windows), []);
|
||||
|
||||
|
||||
Utils.activateSiblingWindow(windows, direction);
|
||||
} else if (scrollAction === 'CHANGE_VOLUME' && !event.is_pointer_emulated()) {
|
||||
let proto = Volume.OutputIndicator.prototype;
|
||||
|
||||
181
prefs.js
181
prefs.js
@@ -160,7 +160,7 @@ const Preferences = class {
|
||||
this._builder.set_scope(new BuilderScope(this));
|
||||
this._settings = settings;
|
||||
this._path = path;
|
||||
|
||||
|
||||
this._metadata = ExtensionPreferences.lookupByURL(import.meta.url).metadata;
|
||||
this._builder.set_translation_domain(this._metadata['gettext-domain']);
|
||||
|
||||
@@ -168,6 +168,7 @@ const Preferences = class {
|
||||
|
||||
// dialogs
|
||||
this._builder.add_from_file(this._path + '/ui/BoxAnimateAppIconHoverOptions.ui');
|
||||
this._builder.add_from_file(this._path + '/ui/BoxHighlightAppIconHoverOptions.ui');
|
||||
this._builder.add_from_file(this._path + '/ui/BoxDotOptions.ui');
|
||||
this._builder.add_from_file(this._path + '/ui/BoxShowDesktopOptions.ui');
|
||||
this._builder.add_from_file(this._path + '/ui/BoxDynamicOpacityOptions.ui');
|
||||
@@ -226,6 +227,8 @@ const Preferences = class {
|
||||
this._tray_size_timeout = 0;
|
||||
this._leftbox_size_timeout = 0;
|
||||
this._appicon_margin_timeout = 0;
|
||||
this._appicon_margin_todesktop_timeout = 0;
|
||||
this._appicon_margin_toscreenborder_timeout = 0;
|
||||
this._appicon_padding_timeout = 0;
|
||||
this._opacity_timeout = 0;
|
||||
this._tray_padding_timeout = 0;
|
||||
@@ -394,7 +397,7 @@ const Preferences = class {
|
||||
|
||||
_displayPanelPositionsForMonitor(monitorIndex) {
|
||||
let taskbarListBox = this._builder.get_object('taskbar_display_listbox');
|
||||
|
||||
|
||||
while(taskbarListBox.get_first_child())
|
||||
{
|
||||
taskbarListBox.remove(taskbarListBox.get_first_child());
|
||||
@@ -420,7 +423,7 @@ const Preferences = class {
|
||||
});
|
||||
child = child.get_next_sibling();
|
||||
}
|
||||
|
||||
|
||||
monitors.forEach(m => panelElementPositionsSettings[m] = newPanelElementPositions);
|
||||
this._settings.set_string('panel-element-positions', JSON.stringify(panelElementPositionsSettings));
|
||||
};
|
||||
@@ -479,7 +482,7 @@ const Preferences = class {
|
||||
if (Pos.optionDialogFunctions[el.element]) {
|
||||
let cogImg = new Gtk.Image({ icon_name: 'emblem-system-symbolic' });
|
||||
let optionsBtn = new Gtk.Button({ tooltip_text: _('More options') });
|
||||
|
||||
|
||||
optionsBtn.get_style_context().add_class('circular');
|
||||
optionsBtn.set_child(cogImg);
|
||||
grid.attach(optionsBtn, 2, 0, 1, 1);
|
||||
@@ -501,7 +504,7 @@ const Preferences = class {
|
||||
|
||||
_createPreferencesDialog(title, content, reset_function = null) {
|
||||
let dialog;
|
||||
|
||||
|
||||
dialog = new Gtk.Dialog({ title: title,
|
||||
transient_for: this.notebook.get_root(),
|
||||
use_header_bar: true,
|
||||
@@ -589,7 +592,7 @@ const Preferences = class {
|
||||
|
||||
_showDesktopButtonOptions() {
|
||||
let box = this._builder.get_object('box_show_showdesktop_options');
|
||||
|
||||
|
||||
let dialog = this._createPreferencesDialog(_('Show Desktop options'), box, () =>
|
||||
{
|
||||
// restore default settings
|
||||
@@ -638,6 +641,14 @@ const Preferences = class {
|
||||
.set_format_value_func((scale, value) => {
|
||||
return value + ' px';
|
||||
});
|
||||
this._builder.get_object('appicon_margin_todesktop_scale')
|
||||
.set_format_value_func((scale, value) => {
|
||||
return value + ' px';
|
||||
});
|
||||
this._builder.get_object('appicon_margin_toscreenborder_scale')
|
||||
.set_format_value_func((scale, value) => {
|
||||
return value + ' px';
|
||||
});
|
||||
|
||||
this._builder.get_object('appicon_padding_scale')
|
||||
.set_format_value_func((scale, value) => {
|
||||
@@ -701,6 +712,12 @@ const Preferences = class {
|
||||
.set_format_value_func((scale, value) => {
|
||||
return ngettext("%d icon", "%d icons", value).format(value);
|
||||
});
|
||||
|
||||
// highlight appicon on hover dialog
|
||||
this._builder.get_object('highlight_appicon_borderradius')
|
||||
.set_format_value_func((scale, value) => {
|
||||
return value + ' px';
|
||||
});
|
||||
}
|
||||
|
||||
_bindSettings() {
|
||||
@@ -863,7 +880,7 @@ const Preferences = class {
|
||||
this._builder.get_object('grid_dot_color'),
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
|
||||
this._settings.bind('dot-color-override',
|
||||
this._builder.get_object('dot_color_unfocused_box'),
|
||||
'sensitive',
|
||||
@@ -873,7 +890,7 @@ const Preferences = class {
|
||||
this._builder.get_object('grid_dot_color_unfocused'),
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
|
||||
for (let i = 1; i <= MAX_WINDOW_INDICATOR; i++) {
|
||||
let rgba = new Gdk.RGBA();
|
||||
rgba.parse(this._settings.get_string('dot-color-' + i));
|
||||
@@ -944,7 +961,7 @@ const Preferences = class {
|
||||
|
||||
this._settings.connect('changed::panel-positions', () => this._updateVerticalRelatedOptions());
|
||||
this._updateVerticalRelatedOptions();
|
||||
|
||||
|
||||
for (let i = 0; i < this.monitors.length; ++i) {
|
||||
//the gnome-shell primary index is the first one in the "available-monitors" setting
|
||||
let label = !i ? _('Primary monitor') : _('Monitor ') + (i + 1);
|
||||
@@ -952,7 +969,7 @@ const Preferences = class {
|
||||
this._builder.get_object('multimon_primary_combo').append_text(label);
|
||||
this._builder.get_object('taskbar_position_monitor_combo').append_text(label);
|
||||
}
|
||||
|
||||
|
||||
this._builder.get_object('multimon_primary_combo').set_active(dtpPrimaryMonitorIndex);
|
||||
this._builder.get_object('taskbar_position_monitor_combo').set_active(dtpPrimaryMonitorIndex);
|
||||
|
||||
@@ -1127,7 +1144,7 @@ const Preferences = class {
|
||||
this._builder.get_object('trans_options_distance_spinbutton').connect('value-changed', (widget) => {
|
||||
this._settings.set_int('trans-dynamic-distance', widget.get_value());
|
||||
});
|
||||
|
||||
|
||||
this._builder.get_object('trans_options_min_opacity_spinbutton').set_value(this._settings.get_double('trans-dynamic-anim-target') * 100);
|
||||
this._builder.get_object('trans_options_min_opacity_spinbutton').connect('value-changed', (widget) => {
|
||||
this._settings.set_double('trans-dynamic-anim-target', widget.get_value() * 0.01);
|
||||
@@ -1160,7 +1177,7 @@ const Preferences = class {
|
||||
dialog.set_default_size(1, 1);
|
||||
|
||||
});
|
||||
|
||||
|
||||
this._settings.bind('desktop-line-use-custom-color',
|
||||
this._builder.get_object('override_show_desktop_line_color_switch'),
|
||||
'active',
|
||||
@@ -1170,7 +1187,7 @@ const Preferences = class {
|
||||
this._builder.get_object('override_show_desktop_line_color_colorbutton'),
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
|
||||
rgba.parse(this._settings.get_string('desktop-line-custom-color'));
|
||||
this._builder.get_object('override_show_desktop_line_color_colorbutton').set_rgba(rgba);
|
||||
this._builder.get_object('override_show_desktop_line_color_colorbutton').connect('color-set', (button) => {
|
||||
@@ -1208,7 +1225,7 @@ const Preferences = class {
|
||||
this._settings.bind('intellihide-use-pressure',
|
||||
this._builder.get_object('intellihide_use_pressure_switch'),
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
this._settings.bind('intellihide-use-pressure',
|
||||
this._builder.get_object('intellihide_use_pressure_options'),
|
||||
@@ -1285,7 +1302,7 @@ const Preferences = class {
|
||||
|
||||
this._settings.set_value('intellihide-pressure-threshold', this._settings.get_default_value('intellihide-pressure-threshold'));
|
||||
this._builder.get_object('intellihide_pressure_threshold_spinbutton').set_value(this._settings.get_int('intellihide-pressure-threshold'));
|
||||
|
||||
|
||||
this._settings.set_value('intellihide-pressure-time', this._settings.get_default_value('intellihide-pressure-time'));
|
||||
this._builder.get_object('intellihide_pressure_time_spinbutton').set_value(this._settings.get_int('intellihide-pressure-time'));
|
||||
|
||||
@@ -1357,7 +1374,7 @@ const Preferences = class {
|
||||
this._builder.get_object('multimon_multi_show_favorites_switch'),
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
|
||||
this._settings.bind('show-favorites',
|
||||
this._builder.get_object('multimon_multi_show_favorites_switch'),
|
||||
'sensitive',
|
||||
@@ -1366,7 +1383,7 @@ const Preferences = class {
|
||||
this._settings.bind('show-running-apps',
|
||||
this._builder.get_object('show_runnning_apps_switch'),
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
this._setPreviewTitlePosition();
|
||||
|
||||
@@ -1395,7 +1412,7 @@ const Preferences = class {
|
||||
this._builder.get_object('animation_time_spinbutton').set_value(this._settings.get_int('window-preview-animation-time'));
|
||||
|
||||
this._settings.set_value('preview-use-custom-opacity', this._settings.get_default_value('preview-use-custom-opacity'));
|
||||
|
||||
|
||||
this._settings.set_value('window-preview-use-custom-icon-size', this._settings.get_default_value('window-preview-use-custom-icon-size'));
|
||||
|
||||
this._settings.set_value('preview-custom-opacity', this._settings.get_default_value('preview-custom-opacity'));
|
||||
@@ -1422,7 +1439,7 @@ const Preferences = class {
|
||||
|
||||
this._settings.set_value('window-preview-aspect-ratio-y', this._settings.get_default_value('window-preview-aspect-ratio-y'));
|
||||
this._builder.get_object('preview_aspect_ratio_y_combo').set_active_id(this._settings.get_int('window-preview-aspect-ratio-y').toString());
|
||||
|
||||
|
||||
this._settings.set_value('window-preview-padding', this._settings.get_default_value('window-preview-padding'));
|
||||
this._builder.get_object('preview_padding_spinbutton').set_value(this._settings.get_int('window-preview-padding'));
|
||||
|
||||
@@ -1430,7 +1447,7 @@ const Preferences = class {
|
||||
|
||||
this._settings.set_value('window-preview-title-font-size', this._settings.get_default_value('window-preview-title-font-size'));
|
||||
this._builder.get_object('preview_title_size_spinbutton').set_value(this._settings.get_int('window-preview-title-font-size'));
|
||||
|
||||
|
||||
this._settings.set_value('window-preview-custom-icon-size', this._settings.get_default_value('window-preview-custom-icon-size'));
|
||||
this._builder.get_object('preview_custom_icon_size_spinbutton').set_value(this._settings.get_int('window-preview-custom-icon-size'));
|
||||
|
||||
@@ -1484,7 +1501,7 @@ const Preferences = class {
|
||||
this._builder.get_object('preview_custom_opacity_spinbutton').connect('value-changed', (widget) => {
|
||||
this._settings.set_int('preview-custom-opacity', widget.get_value());
|
||||
});
|
||||
|
||||
|
||||
this._settings.bind('peek-mode',
|
||||
this._builder.get_object('peek_mode_switch'),
|
||||
'active',
|
||||
@@ -1497,7 +1514,7 @@ const Preferences = class {
|
||||
this._builder.get_object('grid_peek_mode_opacity'),
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
|
||||
this._settings.bind('window-preview-show-title',
|
||||
this._builder.get_object('preview_show_title_switch'),
|
||||
'active',
|
||||
@@ -1568,7 +1585,7 @@ const Preferences = class {
|
||||
this._builder.get_object('preview_title_size_spinbutton').connect('value-changed', (widget) => {
|
||||
this._settings.set_int('window-preview-title-font-size', widget.get_value());
|
||||
});
|
||||
|
||||
|
||||
this._builder.get_object('preview_custom_icon_size_spinbutton').set_value(this._settings.get_int('window-preview-custom-icon-size'));
|
||||
this._builder.get_object('preview_custom_icon_size_spinbutton').connect('value-changed', (widget) => {
|
||||
this._settings.set_int('window-preview-custom-icon-size', widget.get_value());
|
||||
@@ -1588,7 +1605,7 @@ const Preferences = class {
|
||||
dialog.show();
|
||||
|
||||
});
|
||||
|
||||
|
||||
this._settings.bind('isolate-workspaces',
|
||||
this._builder.get_object('isolate_workspaces_switch'),
|
||||
'active',
|
||||
@@ -1651,7 +1668,7 @@ const Preferences = class {
|
||||
this._settings.bind('group-apps-use-launchers',
|
||||
this._builder.get_object('group_apps_use_launchers_switch'),
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
this._builder.get_object('show_group_apps_options_button').connect('clicked', () => {
|
||||
let box = this._builder.get_object('box_group_apps_options');
|
||||
@@ -1713,7 +1730,7 @@ const Preferences = class {
|
||||
dialog.show();
|
||||
dialog.set_default_size(600, 1);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
this._builder.get_object('click_action_combo').set_active_id(this._settings.get_string('click-action'));
|
||||
this._builder.get_object('click_action_combo').connect('changed', (widget) => {
|
||||
@@ -1907,7 +1924,7 @@ const Preferences = class {
|
||||
dialog.set_default_size(600, 1);
|
||||
|
||||
});
|
||||
|
||||
|
||||
// setup dialog for secondary menu options
|
||||
this._builder.get_object('secondarymenu_options_button').connect('clicked', () => {
|
||||
let box = this._builder.get_object('box_secondarymenu_options');
|
||||
@@ -1952,11 +1969,14 @@ const Preferences = class {
|
||||
{objectName: 'tray_size_scale', valueName: 'tray-size', range: DEFAULT_FONT_SIZES },
|
||||
{objectName: 'leftbox_size_scale', valueName: 'leftbox-size', range: DEFAULT_FONT_SIZES },
|
||||
{objectName: 'appicon_margin_scale', valueName: 'appicon-margin', range: DEFAULT_MARGIN_SIZES },
|
||||
{objectName: 'appicon_margin_todesktop_scale', valueName: 'appicon-margin-todesktop', range: DEFAULT_MARGIN_SIZES },
|
||||
{objectName: 'appicon_margin_toscreenborder_scale', valueName: 'appicon-margin-toscreenborder', range: DEFAULT_MARGIN_SIZES },
|
||||
{objectName: 'appicon_padding_scale', valueName: 'appicon-padding', range: DEFAULT_MARGIN_SIZES },
|
||||
{objectName: 'tray_padding_scale', valueName: 'tray-padding', range: DEFAULT_PADDING_SIZES },
|
||||
{objectName: 'leftbox_padding_scale', valueName: 'leftbox-padding', range: DEFAULT_PADDING_SIZES },
|
||||
{objectName: 'statusicon_padding_scale', valueName: 'status-icon-padding', range: DEFAULT_PADDING_SIZES },
|
||||
{objectName: 'panel_length_scale', valueName: '', range: LENGTH_MARKS }
|
||||
{objectName: 'panel_length_scale', valueName: '', range: LENGTH_MARKS },
|
||||
{objectName: 'highlight_appicon_borderradius', valueName: 'highlight-appicon-hover-border-radius', range: [ 16, 12, 8, 4, 2, 0 ] },
|
||||
];
|
||||
|
||||
for(const idx in sizeScales) {
|
||||
@@ -2071,6 +2091,71 @@ const Preferences = class {
|
||||
|
||||
});
|
||||
|
||||
this._settings.bind('highlight-appicon-hover',
|
||||
this._builder.get_object('highlight_appicon_hover_switch'),
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
this._settings.bind('highlight-appicon-hover',
|
||||
this._builder.get_object('highlight_appicon_hover_button'),
|
||||
'sensitive',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
{
|
||||
rgba.parse(this._settings.get_string('highlight-appicon-hover-background-color'));
|
||||
this._builder.get_object('highlight_appicon_color').set_rgba(rgba);
|
||||
this._builder.get_object('highlight_appicon_color').connect('color-set', (button) => {
|
||||
let rgba = button.get_rgba();
|
||||
let css = rgba.to_string();
|
||||
this._settings.set_string('highlight-appicon-hover-background-color', css);
|
||||
});
|
||||
|
||||
rgba.parse(this._settings.get_string('highlight-appicon-pressed-background-color'));
|
||||
this._builder.get_object('pressed_appicon_color').set_rgba(rgba);
|
||||
this._builder.get_object('pressed_appicon_color').connect('color-set', (button) => {
|
||||
let rgba = button.get_rgba();
|
||||
let css = rgba.to_string();
|
||||
this._settings.set_string('highlight-appicon-pressed-background-color', css);
|
||||
});
|
||||
|
||||
let scales = [
|
||||
['highlight_appicon_borderradius', 'highlight-appicon-hover-border-radius'],
|
||||
];
|
||||
|
||||
const updateScale = scale => {
|
||||
let [id, key] = scale;
|
||||
this._builder.get_object(id).set_value(this._settings.get_int(key));
|
||||
};
|
||||
scales.forEach(scale => {
|
||||
updateScale(scale);
|
||||
let [id, key] = scale;
|
||||
this._builder.get_object(id).connect('value-changed', widget => {
|
||||
this._settings.set_int(key, widget.get_value());
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
this._builder.get_object('highlight_appicon_hover_button').connect('clicked', () => {
|
||||
let box = this._builder.get_object('highlight_appicon_hover_options');
|
||||
|
||||
let dialog = this._createPreferencesDialog(_('App icon highlight options'), box, () =>
|
||||
{
|
||||
// restore default settings
|
||||
this._settings.set_value('highlight-appicon-hover-background-color', this._settings.get_default_value('highlight-appicon-hover-background-color'));
|
||||
rgba.parse(this._settings.get_string('highlight-appicon-hover-background-color'));
|
||||
this._builder.get_object('highlight_appicon_color').set_rgba(rgba);
|
||||
this._settings.set_value('highlight-appicon-pressed-background-color', this._settings.get_default_value('highlight-appicon-pressed-background-color'));
|
||||
rgba.parse(this._settings.get_string('highlight-appicon-pressed-background-color'));
|
||||
this._builder.get_object('pressed_appicon_color').set_rgba(rgba);
|
||||
this._settings.set_value('highlight-appicon-hover-border-radius', this._settings.get_default_value('highlight-appicon-hover-border-radius'));
|
||||
this._builder.get_object('highlight_appicon_borderradius').set_value(this._settings.get_int('highlight-appicon-hover-border-radius'));
|
||||
});
|
||||
|
||||
dialog.show();
|
||||
|
||||
});
|
||||
|
||||
this._settings.bind('stockgs-keep-dash',
|
||||
this._builder.get_object('stockgs_dash_switch'),
|
||||
'active',
|
||||
@@ -2081,7 +2166,7 @@ const Preferences = class {
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
|
||||
|
||||
|
||||
this._settings.connect('changed::stockgs-keep-top-panel', () => this._maybeDisableTopPosition());
|
||||
|
||||
@@ -2091,7 +2176,7 @@ const Preferences = class {
|
||||
this._builder.get_object('stockgs_panelbtn_switch'),
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
|
||||
this._settings.bind('stockgs-force-hotcorner',
|
||||
this._builder.get_object('stockgs_hotcorner_switch'),
|
||||
'active',
|
||||
@@ -2193,7 +2278,7 @@ const Preferences = class {
|
||||
dialog.connect('response', (dialog, id) => {
|
||||
if (id == Gtk.ResponseType.ACCEPT)
|
||||
acceptHandler.call(this, dialog.get_file().get_path());
|
||||
|
||||
|
||||
dialog.destroy();
|
||||
});
|
||||
}
|
||||
@@ -2203,7 +2288,7 @@ const Preferences = class {
|
||||
const BuilderScope = GObject.registerClass({
|
||||
Implements: [Gtk.BuilderScope],
|
||||
}, class BuilderScope extends GObject.Object {
|
||||
|
||||
|
||||
_init(preferences) {
|
||||
this._preferences = preferences;
|
||||
super._init();
|
||||
@@ -2212,13 +2297,13 @@ const BuilderScope = GObject.registerClass({
|
||||
vfunc_create_closure(builder, handlerName, flags, connectObject) {
|
||||
if (flags & Gtk.BuilderClosureFlags.SWAPPED)
|
||||
throw new Error('Unsupported template signal flag "swapped"');
|
||||
|
||||
|
||||
if (typeof this[handlerName] === 'undefined')
|
||||
throw new Error(`${handlerName} is undefined`);
|
||||
|
||||
|
||||
return this[handlerName].bind(connectObject || this);
|
||||
}
|
||||
|
||||
|
||||
on_btn_click(connectObject) {
|
||||
connectObject.set_label("Clicked");
|
||||
}
|
||||
@@ -2230,7 +2315,7 @@ const BuilderScope = GObject.registerClass({
|
||||
position_top_button_clicked_cb(button) {
|
||||
if (!this._preferences._ignorePositionRadios && button.get_active()) this._preferences._setPanelPosition(Pos.TOP);
|
||||
}
|
||||
|
||||
|
||||
position_left_button_clicked_cb(button) {
|
||||
if (!this._preferences._ignorePositionRadios && button.get_active()) this._preferences._setPanelPosition(Pos.LEFT);
|
||||
}
|
||||
@@ -2323,6 +2408,30 @@ const BuilderScope = GObject.registerClass({
|
||||
});
|
||||
}
|
||||
|
||||
appicon_margin_todesktop_scale_value_changed_cb(scale) {
|
||||
// Avoid settings the size consinuosly
|
||||
if (this._preferences._appicon_margin_todesktop_timeout > 0)
|
||||
GLib.Source.remove(this._preferences._appicon_margin_todesktop_timeout);
|
||||
|
||||
this._preferences._appicon_margin_todesktop_timeout = GLib.timeout_add(GLib.PRIORITY_DEFAULT, SCALE_UPDATE_TIMEOUT, () => {
|
||||
this._preferences._settings.set_int('appicon-margin-todesktop', scale.get_value());
|
||||
this._preferences._appicon_margin_todesktop_timeout = 0;
|
||||
return GLib.SOURCE_REMOVE;
|
||||
});
|
||||
}
|
||||
|
||||
appicon_margin_toscreenborder_scale_value_changed_cb(scale) {
|
||||
// Avoid settings the size consinuosly
|
||||
if (this._preferences._appicon_margin_toscreenborder_timeout > 0)
|
||||
GLib.Source.remove(this._preferences._appicon_margin_toscreenborder_timeout);
|
||||
|
||||
this._preferences._appicon_margin_toscreenborder_timeout = GLib.timeout_add(GLib.PRIORITY_DEFAULT, SCALE_UPDATE_TIMEOUT, () => {
|
||||
this._preferences._settings.set_int('appicon-margin-toscreenborder', scale.get_value());
|
||||
this._preferences._appicon_margin_toscreenborder_timeout = 0;
|
||||
return GLib.SOURCE_REMOVE;
|
||||
});
|
||||
}
|
||||
|
||||
appicon_padding_scale_value_changed_cb(scale) {
|
||||
// Avoid settings the size consinuosly
|
||||
if (this._preferences._appicon_padding_timeout > 0)
|
||||
|
||||
@@ -736,6 +736,16 @@
|
||||
<summary>App icon margin</summary>
|
||||
<description>Set the margin for application icons in the embedded dash.</description>
|
||||
</key>
|
||||
<key type="i" name="appicon-margin-todesktop">
|
||||
<default>0</default>
|
||||
<summary>App icon margin to desktop</summary>
|
||||
<description>Set the margin for application icons in the embedded dash towards the desktop (top margin if panel is on the bottom).</description>
|
||||
</key>
|
||||
<key type="i" name="appicon-margin-toscreenborder">
|
||||
<default>0</default>
|
||||
<summary>App icon margin to screen border</summary>
|
||||
<description>Set the margin for application icons in the embedded dash towards the desktop (bottom margin if panel is on the bottom).</description>
|
||||
</key>
|
||||
<key type="i" name="appicon-padding">
|
||||
<default>4</default>
|
||||
<summary>App icon padding</summary>
|
||||
@@ -796,6 +806,22 @@
|
||||
<default>{'SIMPLE':1,'RIPPLE':1.25,'PLANK':2}</default>
|
||||
<summary>App icon hover animation zoom scale in relation to the app icon size</summary>
|
||||
</key>
|
||||
<key type="b" name="highlight-appicon-hover">
|
||||
<default>true</default>
|
||||
<summary>Highlight app icon on hover</summary>
|
||||
</key>
|
||||
<key type="s" name="highlight-appicon-hover-background-color">
|
||||
<default>"rgba(238, 238, 236, 0.1)"</default>
|
||||
<summary>Highlight color</summary>
|
||||
</key>
|
||||
<key type="s" name="highlight-appicon-pressed-background-color">
|
||||
<default>"rgba(238, 238, 236, 0.18)"</default>
|
||||
<summary>Mouse down highlight color</summary>
|
||||
</key>
|
||||
<key type="i" name="highlight-appicon-hover-border-radius">
|
||||
<default>0</default>
|
||||
<summary>Highlight border radius</summary>
|
||||
</key>
|
||||
<key type="b" name="secondarymenu-contains-appmenu">
|
||||
<default>true</default>
|
||||
<summary>Integrate items from the gnome appmenu into the right click menu</summary>
|
||||
|
||||
@@ -39,22 +39,34 @@
|
||||
}
|
||||
|
||||
#dashtopanelScrollview .overview-tile:hover .dtp-container,
|
||||
#dashtopanelScrollview .overview-tile:focus .dtp-container,
|
||||
#dashtopanelScrollview .overview-tile:focus .dtp-container {
|
||||
background-color: rgba(238, 238, 236, 0.1);
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
#dashtopanelScrollview .overview-tile:hover .dtp-container > .dtp-dots-container,
|
||||
#dashtopanelScrollview .overview-tile:focus .dtp-container > .dtp-dots-container {
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
.dashtopanelMainPanel .dash-item-container .show-apps:hover {
|
||||
background-color: rgba(238, 238, 238, 0.1);
|
||||
}
|
||||
|
||||
.dashtopanelMainPanel .dash-item-container .show-apps .overview-icon {
|
||||
color: #FFF;
|
||||
}
|
||||
.dashtopanelMainPanel .dash-item-container .show-apps:hover .overview-icon {
|
||||
background: none;
|
||||
}
|
||||
|
||||
#dashtopanelTaskbar .dash-item-container .overview-tile:hover,
|
||||
#dashtopanelTaskbar .dash-item-container .overview-tile .dtp-container .overview-icon,
|
||||
#dashtopanelScrollview .overview-tile:hover .dtp-container.animate-appicon-hover,
|
||||
.dashtopanelMainPanel .dash-item-container .show-apps:hover .overview-icon {
|
||||
#dashtopanelScrollview .overview-tile:hover .dtp-container.no-highlight,
|
||||
#dashtopanelScrollview .overview-tile:focus .dtp-container.no-highlight {
|
||||
background: none;
|
||||
}
|
||||
|
||||
|
||||
#dashtopanelScrollview .overview-tile:active .dtp-container {
|
||||
background-color: rgba(238, 238, 236, 0.18);
|
||||
}
|
||||
|
||||
130
taskbar.js
130
taskbar.js
@@ -153,11 +153,11 @@ const iconAnimationSettings = {
|
||||
},
|
||||
|
||||
get travel() {
|
||||
return Math.max(0, this._getDictValue('animate-appicon-hover-animation-travel'));
|
||||
return Math.max(-1, this._getDictValue('animate-appicon-hover-animation-travel'));
|
||||
},
|
||||
|
||||
get zoom() {
|
||||
return Math.max(1, this._getDictValue('animate-appicon-hover-animation-zoom'));
|
||||
return Math.max(0.5, this._getDictValue('animate-appicon-hover-animation-zoom'));
|
||||
},
|
||||
};
|
||||
|
||||
@@ -209,7 +209,7 @@ export const TaskbarActor = GObject.registerClass({
|
||||
leftFade.set_style(gradientStyle);
|
||||
rightFade.set_style(gradientStyle);
|
||||
}
|
||||
|
||||
|
||||
childBox[panel.varCoord.c2] = childBox[panel.varCoord.c1] + (value > 0 ? scrollview._dtpFadeSize : 0);
|
||||
leftFade.allocate(childBox);
|
||||
|
||||
@@ -223,13 +223,13 @@ export const TaskbarActor = GObject.registerClass({
|
||||
// then calls BoxLayout)
|
||||
vfunc_get_preferred_width(forHeight) {
|
||||
let [, natWidth] = St.Widget.prototype.vfunc_get_preferred_width.call(this, forHeight);
|
||||
|
||||
|
||||
return [0, natWidth];
|
||||
}
|
||||
|
||||
vfunc_get_preferred_height(forWidth) {
|
||||
let [, natHeight] = St.Widget.prototype.vfunc_get_preferred_height.call(this, forWidth);
|
||||
|
||||
|
||||
return [0, natHeight];
|
||||
}
|
||||
});
|
||||
@@ -254,7 +254,7 @@ export const Taskbar = class extends EventEmitter {
|
||||
super();
|
||||
|
||||
this.dtpPanel = panel;
|
||||
|
||||
|
||||
// start at smallest size due to running indicator drawing area expanding but not shrinking
|
||||
this.iconSize = 16;
|
||||
|
||||
@@ -307,13 +307,13 @@ export const Taskbar = class extends EventEmitter {
|
||||
|
||||
this._container.add_child(new St.Widget({ width: 0, reactive: false }));
|
||||
this._container.add_child(this._scrollView);
|
||||
|
||||
|
||||
let orientation = panel.getOrientation();
|
||||
let fadeStyle = 'background-gradient-direction:' + orientation;
|
||||
let fade1 = new St.Widget({ style_class: 'scrollview-fade', reactive: false });
|
||||
let fade2 = new St.Widget({ style_class: 'scrollview-fade',
|
||||
reactive: false,
|
||||
pivot_point: new Graphene.Point({ x: .5, y: .5 }),
|
||||
let fade2 = new St.Widget({ style_class: 'scrollview-fade',
|
||||
reactive: false,
|
||||
pivot_point: new Graphene.Point({ x: .5, y: .5 }),
|
||||
rotation_angle_z: 180 });
|
||||
|
||||
fade1.set_style(fadeStyle);
|
||||
@@ -333,7 +333,7 @@ export const Taskbar = class extends EventEmitter {
|
||||
});
|
||||
|
||||
const adjustment = this._scrollView[orientation[0] + 'adjustment'];
|
||||
|
||||
|
||||
this._workId = Main.initializeDeferredWork(this._box, this._redisplay.bind(this));
|
||||
|
||||
this._settings = new Gio.Settings({ schema_id: 'org.gnome.shell' });
|
||||
@@ -373,7 +373,7 @@ export const Taskbar = class extends EventEmitter {
|
||||
],
|
||||
[
|
||||
global.window_manager,
|
||||
'switch-workspace',
|
||||
'switch-workspace',
|
||||
() => this._connectWorkspaceSignals()
|
||||
],
|
||||
[
|
||||
@@ -456,7 +456,7 @@ export const Taskbar = class extends EventEmitter {
|
||||
let setAttributes = () => {
|
||||
this.isGroupApps = SETTINGS.get_boolean('group-apps');
|
||||
this.usingLaunchers = !this.isGroupApps && SETTINGS.get_boolean('group-apps-use-launchers');
|
||||
this.showFavorites = SETTINGS.get_boolean('show-favorites') &&
|
||||
this.showFavorites = SETTINGS.get_boolean('show-favorites') &&
|
||||
(this.dtpPanel.isPrimary || SETTINGS.get_boolean('show-favorites-all-monitors'))
|
||||
this.showRunningApps = SETTINGS.get_boolean('show-running-apps')
|
||||
this.allowSplitApps = this.usingLaunchers || (!this.isGroupApps && !this.showFavorites)
|
||||
@@ -483,7 +483,7 @@ export const Taskbar = class extends EventEmitter {
|
||||
this._signalsHandler = 0;
|
||||
|
||||
this._container.destroy();
|
||||
|
||||
|
||||
this.previewMenu.disable();
|
||||
this.previewMenu.destroy();
|
||||
|
||||
@@ -650,7 +650,7 @@ export const Taskbar = class extends EventEmitter {
|
||||
if (this._dragInfo) {
|
||||
this._box.set_child_at_index(this._dragInfo[1]._dashItemContainer, this._dragInfo[0]);
|
||||
}
|
||||
|
||||
|
||||
this._endDrag();
|
||||
}
|
||||
|
||||
@@ -672,10 +672,10 @@ export const Taskbar = class extends EventEmitter {
|
||||
this._clearEmptyDropTarget();
|
||||
this._showAppsIcon.setDragApp(null);
|
||||
DND.removeDragMonitor(this._dragMonitor);
|
||||
|
||||
|
||||
this._dragMonitor = null;
|
||||
this.emit('end-drag');
|
||||
|
||||
|
||||
this._toggleFavoriteHighlight();
|
||||
}
|
||||
|
||||
@@ -697,9 +697,9 @@ export const Taskbar = class extends EventEmitter {
|
||||
_toggleFavoriteHighlight(show) {
|
||||
let appFavorites = AppFavorites.getAppFavorites();
|
||||
let cssFuncName = (show ? 'add' : 'remove') + '_style_class_name';
|
||||
|
||||
|
||||
if (this.showFavorites)
|
||||
this._getAppIcons().filter(appIcon => (this.usingLaunchers && appIcon.isLauncher) ||
|
||||
this._getAppIcons().filter(appIcon => (this.usingLaunchers && appIcon.isLauncher) ||
|
||||
(!this.usingLaunchers && appFavorites.isFavorite(appIcon.app.get_id())))
|
||||
.forEach(fav => fav._container[cssFuncName]('favorite'));
|
||||
}
|
||||
@@ -744,12 +744,12 @@ export const Taskbar = class extends EventEmitter {
|
||||
_createAppItem(app, window, isLauncher) {
|
||||
let appIcon = new AppIcons.TaskbarAppIcon(
|
||||
{
|
||||
app,
|
||||
app,
|
||||
window,
|
||||
isLauncher
|
||||
},
|
||||
this.dtpPanel,
|
||||
{
|
||||
{
|
||||
setSizeManually: true,
|
||||
showLabel: false,
|
||||
isDraggable: !SETTINGS.get_boolean('taskbar-locked'),
|
||||
@@ -788,7 +788,7 @@ export const Taskbar = class extends EventEmitter {
|
||||
|
||||
appIcon.connect('notify::hover', () => {
|
||||
if (appIcon.hover){
|
||||
this._timeoutsHandler.add([T1, 100,
|
||||
this._timeoutsHandler.add([T1, 100,
|
||||
() => Utils.ensureActorVisibleInScrollView(this._scrollView, appIcon, this._scrollView._dtpFadeSize)
|
||||
])
|
||||
|
||||
@@ -819,7 +819,7 @@ export const Taskbar = class extends EventEmitter {
|
||||
appIcon._menu._boxPointer.yOffset = -y_shift;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Override default AppIcon label_actor, now the
|
||||
// accessible_name is set at DashItemContainer.setLabelText
|
||||
appIcon.label_actor = null;
|
||||
@@ -921,13 +921,13 @@ export const Taskbar = class extends EventEmitter {
|
||||
if (availSize < minIconSize) {
|
||||
availSize = minIconSize;
|
||||
}
|
||||
|
||||
|
||||
// For the icon size, we only consider children which are "proper"
|
||||
// icons and which are not animating out (which means they will be
|
||||
// icons and which are not animating out (which means they will be
|
||||
// destroyed at the end of the animation)
|
||||
let iconChildren = this._getTaskbarIcons().concat([this._showAppsIcon]);
|
||||
let scale = this.iconSize / availSize;
|
||||
|
||||
|
||||
this.iconSize = availSize;
|
||||
|
||||
for (let i = 0; i < iconChildren.length; i++) {
|
||||
@@ -960,7 +960,7 @@ export const Taskbar = class extends EventEmitter {
|
||||
}
|
||||
|
||||
sortAppsCompareFunction(appA, appB) {
|
||||
return getAppStableSequence(appA, this.dtpPanel.monitor) -
|
||||
return getAppStableSequence(appA, this.dtpPanel.monitor) -
|
||||
getAppStableSequence(appB, this.dtpPanel.monitor);
|
||||
}
|
||||
|
||||
@@ -1012,9 +1012,9 @@ export const Taskbar = class extends EventEmitter {
|
||||
(!this.allowSplitApps || this.isGroupApps || appInfo.windows[0] == appIcon.window) &&
|
||||
appInfo.isLauncher == appIcon.isLauncher);
|
||||
|
||||
if (appIndex < 0 ||
|
||||
if (appIndex < 0 ||
|
||||
(appIcon.window && (this.isGroupApps || expectedAppInfos[appIndex].windows.indexOf(appIcon.window) < 0)) ||
|
||||
(!appIcon.window && !appIcon.isLauncher &&
|
||||
(!appIcon.window && !appIcon.isLauncher &&
|
||||
!this.isGroupApps && expectedAppInfos[appIndex].windows.length)) {
|
||||
currentAppIcons[i][this._shownInitially ? 'animateOutAndDestroy' : 'destroy']();
|
||||
currentAppIcons.splice(i, 1);
|
||||
@@ -1024,13 +1024,13 @@ export const Taskbar = class extends EventEmitter {
|
||||
//if needed, reorder the existing appIcons and create the missing ones
|
||||
let currentPosition = 0;
|
||||
for (let i = 0, l = expectedAppInfos.length; i < l; ++i) {
|
||||
let neededAppIcons = this.isGroupApps || !expectedAppInfos[i].windows.length ?
|
||||
[{ app: expectedAppInfos[i].app, window: null, isLauncher: expectedAppInfos[i].isLauncher }] :
|
||||
let neededAppIcons = this.isGroupApps || !expectedAppInfos[i].windows.length ?
|
||||
[{ app: expectedAppInfos[i].app, window: null, isLauncher: expectedAppInfos[i].isLauncher }] :
|
||||
expectedAppInfos[i].windows.map(window => ({ app: expectedAppInfos[i].app, window: window, isLauncher: false }));
|
||||
|
||||
|
||||
for (let j = 0, ll = neededAppIcons.length; j < ll; ++j) {
|
||||
//check if the icon already exists
|
||||
let matchingAppIconIndex = Utils.findIndex(currentAppIcons, appIcon => appIcon.child._delegate.app == neededAppIcons[j].app &&
|
||||
let matchingAppIconIndex = Utils.findIndex(currentAppIcons, appIcon => appIcon.child._delegate.app == neededAppIcons[j].app &&
|
||||
appIcon.child._delegate.window == neededAppIcons[j].window);
|
||||
|
||||
if (matchingAppIconIndex > 0 && matchingAppIconIndex != currentPosition) {
|
||||
@@ -1040,10 +1040,10 @@ export const Taskbar = class extends EventEmitter {
|
||||
} else if (matchingAppIconIndex < 0) {
|
||||
//the icon doesn't exist yet, create a new one
|
||||
let newAppIcon = this._createAppItem(neededAppIcons[j].app, neededAppIcons[j].window, neededAppIcons[j].isLauncher);
|
||||
|
||||
|
||||
this._box.insert_child_at_index(newAppIcon, currentPosition);
|
||||
currentAppIcons.splice(currentPosition, 0, newAppIcon);
|
||||
|
||||
|
||||
// Skip animations on first run when adding the initial set
|
||||
// of items, to avoid all items zooming in at once
|
||||
newAppIcon.show(this._shownInitially);
|
||||
@@ -1082,14 +1082,14 @@ export const Taskbar = class extends EventEmitter {
|
||||
apps.push(app);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return apps;
|
||||
}
|
||||
|
||||
_createAppInfos(apps, defaultWindows, defaultIsLauncher) {
|
||||
if (this.allowSplitApps && !defaultIsLauncher) {
|
||||
let separateApps = []
|
||||
|
||||
|
||||
if (apps.length) {
|
||||
let tracker = Shell.WindowTracker.get_default();
|
||||
let windows = AppIcons.getInterestingWindows(null, this.dtpPanel.monitor)
|
||||
@@ -1100,8 +1100,8 @@ export const Taskbar = class extends EventEmitter {
|
||||
|
||||
if (apps.indexOf(windowApp) >= 0)
|
||||
separateApps.push({
|
||||
app: windowApp,
|
||||
isLauncher: false,
|
||||
app: windowApp,
|
||||
isLauncher: false,
|
||||
windows: [w]
|
||||
})
|
||||
})
|
||||
@@ -1110,8 +1110,8 @@ export const Taskbar = class extends EventEmitter {
|
||||
return separateApps
|
||||
}
|
||||
|
||||
return apps.map(app => ({
|
||||
app: app,
|
||||
return apps.map(app => ({
|
||||
app: app,
|
||||
isLauncher: defaultIsLauncher || false,
|
||||
windows: defaultWindows || AppIcons.getInterestingWindows(app, this.dtpPanel.monitor)
|
||||
.sort(sortWindowsCompareFunction)
|
||||
@@ -1200,10 +1200,10 @@ export const Taskbar = class extends EventEmitter {
|
||||
|
||||
let currentAppIcons = this._getAppIcons();
|
||||
let sourceIndex = currentAppIcons.indexOf(source);
|
||||
let hoveredIndex = Utils.findIndex(currentAppIcons,
|
||||
appIcon => pos >= appIcon._dashItemContainer[posProp] &&
|
||||
let hoveredIndex = Utils.findIndex(currentAppIcons,
|
||||
appIcon => pos >= appIcon._dashItemContainer[posProp] &&
|
||||
pos <= (appIcon._dashItemContainer[posProp] + appIcon._dashItemContainer[sizeProp]));
|
||||
|
||||
|
||||
if (!this._dragInfo) {
|
||||
this._dragInfo = [sourceIndex, source];
|
||||
}
|
||||
@@ -1216,13 +1216,13 @@ export const Taskbar = class extends EventEmitter {
|
||||
// Don't allow positioning before or after self and between icons of same app if ungrouped and showing favorites
|
||||
if (!(hoveredIndex === sourceIndex ||
|
||||
(isLeft && hoveredIndex - 1 == sourceIndex) ||
|
||||
(!this.allowSplitApps && isLeft && hoveredIndex - 1 >= 0 && source.app != prevIcon.app &&
|
||||
(!this.allowSplitApps && isLeft && hoveredIndex - 1 >= 0 && source.app != prevIcon.app &&
|
||||
prevIcon.app == currentAppIcons[hoveredIndex].app) ||
|
||||
(!isLeft && hoveredIndex + 1 == sourceIndex) ||
|
||||
(!this.allowSplitApps && !isLeft && hoveredIndex + 1 < currentAppIcons.length && source.app != nextIcon.app &&
|
||||
(!this.allowSplitApps && !isLeft && hoveredIndex + 1 < currentAppIcons.length && source.app != nextIcon.app &&
|
||||
nextIcon.app == currentAppIcons[hoveredIndex].app))) {
|
||||
this._box.set_child_at_index(source._dashItemContainer, hoveredIndex);
|
||||
|
||||
|
||||
// Ensure the next and previous icon are visible when moving the icon
|
||||
// (I assume there's room for both of them)
|
||||
if (hoveredIndex > 1)
|
||||
@@ -1231,14 +1231,14 @@ export const Taskbar = class extends EventEmitter {
|
||||
Utils.ensureActorVisibleInScrollView(this._scrollView, this._box.get_children()[hoveredIndex+1], this._scrollView._dtpFadeSize);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return this._dragInfo[0] !== sourceIndex ? DND.DragMotionResult.MOVE_DROP : DND.DragMotionResult.CONTINUE;
|
||||
}
|
||||
|
||||
// Draggable target interface
|
||||
acceptDrop (source, actor, x, y, time) {
|
||||
// Don't allow favoriting of transient apps
|
||||
if (!this._dragInfo || !source.app || source.app.is_window_backed() ||
|
||||
if (!this._dragInfo || !source.app || source.app.is_window_backed() ||
|
||||
!this._settings.is_writable('favorite-apps')) {
|
||||
return false;
|
||||
}
|
||||
@@ -1269,9 +1269,9 @@ export const Taskbar = class extends EventEmitter {
|
||||
let appWindows = interestingWindows[app]; //prevents "reference to undefined property Symbol.toPrimitive" warning
|
||||
return appWindows;
|
||||
};
|
||||
|
||||
if (sameApps.length &&
|
||||
((!appIcons[sourceIndex - 1] || appIcons[sourceIndex - 1].app !== source.app) &&
|
||||
|
||||
if (sameApps.length &&
|
||||
((!appIcons[sourceIndex - 1] || appIcons[sourceIndex - 1].app !== source.app) &&
|
||||
(!appIcons[sourceIndex + 1] || appIcons[sourceIndex + 1].app !== source.app))) {
|
||||
appIcons.splice(appIcons.indexOf(sameApps[0]), sameApps.length);
|
||||
Array.prototype.splice.apply(appIcons, [sourceIndex + 1, 0].concat(sameApps));
|
||||
@@ -1279,15 +1279,15 @@ export const Taskbar = class extends EventEmitter {
|
||||
|
||||
for (let i = 0, l = appIcons.length; i < l; ++i) {
|
||||
let windows = [];
|
||||
|
||||
|
||||
if (!usingLaunchers || (!source.isLauncher && !appIcons[i].isLauncher)) {
|
||||
windows = appIcons[i].window ? [appIcons[i].window] : getAppWindows(appIcons[i].app);
|
||||
}
|
||||
|
||||
windows.forEach(w => w._dtpPosition = position++);
|
||||
|
||||
if (this.showFavorites &&
|
||||
((usingLaunchers && appIcons[i].isLauncher) ||
|
||||
if (this.showFavorites &&
|
||||
((usingLaunchers && appIcons[i].isLauncher) ||
|
||||
(!usingLaunchers && appFavorites.isFavorite(appIcons[i].app.get_id())))) {
|
||||
++favoritesCount;
|
||||
}
|
||||
@@ -1326,10 +1326,10 @@ export const Taskbar = class extends EventEmitter {
|
||||
SearchController._onStageKeyPress = function(actor, event) {
|
||||
if (Main.modalCount == 1 && event.get_key_symbol() === Clutter.KEY_Escape) {
|
||||
this._searchActive ? this.reset() : Main.overview.hide();
|
||||
|
||||
|
||||
return Clutter.EVENT_STOP;
|
||||
}
|
||||
|
||||
|
||||
return Object.getPrototypeOf(this)._onStageKeyPress.call(this, actor, event);
|
||||
};
|
||||
|
||||
@@ -1364,13 +1364,13 @@ export const Taskbar = class extends EventEmitter {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
_syncShowAppsButtonToggled() {
|
||||
let status = SearchController._showAppsButton.checked;
|
||||
if (this.showAppsButton.checked !== status)
|
||||
this.showAppsButton.checked = status;
|
||||
}
|
||||
|
||||
|
||||
showShowAppsButton() {
|
||||
this.showAppsButton.visible = true;
|
||||
this.showAppsButton.set_width(-1);
|
||||
@@ -1446,7 +1446,7 @@ export const TaskbarItemContainer = GObject.registerClass({
|
||||
|
||||
let travel = iconAnimationSettings.travel;
|
||||
let zoom = iconAnimationSettings.zoom;
|
||||
return this._dtpPanel.dtpSize * (travel + (zoom - 1) / 2);
|
||||
return this._dtpPanel.dtpSize * Math.max(0, travel + (zoom - 1) / 2);
|
||||
}
|
||||
|
||||
_updateCloneContainerPosition(cloneContainer) {
|
||||
@@ -1542,10 +1542,10 @@ export const TaskbarItemContainer = GObject.registerClass({
|
||||
let translationMax = (vertical ? width : height) * (travel + (zoom - 1) / 2);
|
||||
let translationEnd = translationMax * level;
|
||||
let translationDone = vertical ? this._raisedClone.translation_x : this._raisedClone.translation_y;
|
||||
let translationTodo = Math.abs(translationEnd - translationDone);
|
||||
let translationTodo = Math.sign(travel)*Math.abs(translationEnd - translationDone);
|
||||
let scale = 1 + (zoom - 1) * level;
|
||||
let rotationAngleZ = rotationDirection * rotation * level;
|
||||
let time = duration * translationTodo / translationMax;
|
||||
let time = Math.abs(duration * translationTodo / translationMax);
|
||||
|
||||
let options = {
|
||||
scale_x: scale, scale_y: scale,
|
||||
@@ -1596,7 +1596,7 @@ const DragPlaceholderItem = GObject.registerClass({
|
||||
|
||||
this.child = { _delegate: appIcon };
|
||||
|
||||
this._clone = new Clutter.Clone({
|
||||
this._clone = new Clutter.Clone({
|
||||
source: appIcon.icon._iconBin,
|
||||
width: iconSize,
|
||||
height: iconSize
|
||||
@@ -1613,7 +1613,7 @@ const DragPlaceholderItem = GObject.registerClass({
|
||||
|
||||
export function getAppStableSequence(app, monitor) {
|
||||
let windows = AppIcons.getInterestingWindows(app, monitor);
|
||||
|
||||
|
||||
return windows.reduce((prevWindow, window) => {
|
||||
return Math.min(prevWindow, getWindowStableSequence(window));
|
||||
}, Infinity);
|
||||
@@ -1624,5 +1624,5 @@ export function sortWindowsCompareFunction(windowA, windowB) {
|
||||
}
|
||||
|
||||
export function getWindowStableSequence(window) {
|
||||
return ('_dtpPosition' in window ? window._dtpPosition : window.get_stable_sequence());
|
||||
return ('_dtpPosition' in window ? window._dtpPosition : window.get_stable_sequence());
|
||||
}
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
</object>
|
||||
|
||||
<object class="GtkAdjustment" id="animate_appicon_hover_options_travel_adjustment">
|
||||
<property name="lower">0</property>
|
||||
<property name="lower">-100</property>
|
||||
<property name="upper">100</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">5</property>
|
||||
</object>
|
||||
|
||||
<object class="GtkAdjustment" id="animate_appicon_hover_options_zoom_adjustment">
|
||||
<property name="lower">100</property>
|
||||
<property name="lower">10</property>
|
||||
<property name="upper">250</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">5</property>
|
||||
|
||||
70
ui/BoxHighlightAppIconHoverOptions.ui
Normal file
70
ui/BoxHighlightAppIconHoverOptions.ui
Normal file
@@ -0,0 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk" version="4.0"/>
|
||||
|
||||
<!-- adjustments -->
|
||||
<object class="GtkAdjustment" id="highlight_appicon_borderradius_adjustment">
|
||||
<property name="lower">0</property>
|
||||
<property name="upper">10</property>
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">2</property>
|
||||
</object>
|
||||
|
||||
<object class="GtkBox" id="highlight_appicon_hover_options">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="width-request">600</property>
|
||||
<property name="spacing">24</property>
|
||||
<property name="margin-top">32</property>
|
||||
<property name="margin-bottom">32</property>
|
||||
<property name="margin-start">32</property>
|
||||
<property name="margin-end">32</property>
|
||||
|
||||
<child>
|
||||
<object class="AdwPreferencesGroup">
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes">Highlight AppIcon color</property>
|
||||
<child>
|
||||
<object class="GtkColorButton" id="highlight_appicon_color">
|
||||
<property name="receives_default">True</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="use_alpha">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes">Pressed AppIcon color</property>
|
||||
<child>
|
||||
<object class="GtkColorButton" id="pressed_appicon_color">
|
||||
<property name="receives_default">True</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="use_alpha">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes">Highlight AppIcon border radius</property>
|
||||
<property name="subtitle" translatable="yes">(default is 0)</property>
|
||||
<child>
|
||||
<object class="GtkScale" id="highlight_appicon_borderradius">
|
||||
<property name="width-request">300</property>
|
||||
<property name="adjustment">highlight_appicon_borderradius_adjustment</property>
|
||||
<property name="round_digits">0</property>
|
||||
<property name="digits">0</property>
|
||||
<property name="value_pos">right</property>
|
||||
<property name="draw_value">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
|
||||
</object>
|
||||
|
||||
</interface>
|
||||
@@ -52,7 +52,7 @@
|
||||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes">Override Show Desktop line color</property>
|
||||
<child>
|
||||
<object class="GtkColorButton" id="override_show_desktop_line_color_colorbutton">>
|
||||
<object class="GtkColorButton" id="override_show_desktop_line_color_colorbutton">
|
||||
<property name="receives_default">True</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="use_alpha">True</property>
|
||||
|
||||
@@ -9,6 +9,20 @@
|
||||
<property name="page_increment">0.1</property>
|
||||
</object>
|
||||
|
||||
<object class="GtkAdjustment" id="appicon_margin_todesktop_adjustment">
|
||||
<property name="lower">0.33</property>
|
||||
<property name="upper">1</property>
|
||||
<property name="step_increment">0.01</property>
|
||||
<property name="page_increment">0.1</property>
|
||||
</object>
|
||||
|
||||
<object class="GtkAdjustment" id="appicon_margin_toscreenborder_adjustment">
|
||||
<property name="lower">0.33</property>
|
||||
<property name="upper">1</property>
|
||||
<property name="step_increment">0.01</property>
|
||||
<property name="page_increment">0.1</property>
|
||||
</object>
|
||||
|
||||
<object class="GtkAdjustment" id="appicon_padding_adjustment">
|
||||
<property name="lower">0.33</property>
|
||||
<property name="upper">1</property>
|
||||
@@ -42,7 +56,7 @@
|
||||
<child>
|
||||
<object class="AdwPreferencesGroup" id="style_group_app_icon_style">
|
||||
<property name="title" translatable="yes">AppIcon style</property>
|
||||
|
||||
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes">App Icon Margin</property>
|
||||
@@ -61,6 +75,42 @@
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes">App Icon Margin Towards Desktop</property>
|
||||
<property name="subtitle" translatable="yes">(default is 0)</property>
|
||||
<child>
|
||||
<object class="GtkScale" id="appicon_margin_todesktop_scale">
|
||||
<property name="width-request">300</property>
|
||||
<property name="adjustment">appicon_margin_todesktop_adjustment</property>
|
||||
<property name="round_digits">0</property>
|
||||
<property name="digits">0</property>
|
||||
<property name="value_pos">right</property>
|
||||
<property name="draw_value">True</property>
|
||||
<signal name="value-changed" handler="appicon_margin_todesktop_scale_value_changed_cb" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes">App Icon Margin Towards Screen Border</property>
|
||||
<property name="subtitle" translatable="yes">(default is 0)</property>
|
||||
<child>
|
||||
<object class="GtkScale" id="appicon_margin_toscreenborder_scale">
|
||||
<property name="width-request">300</property>
|
||||
<property name="adjustment">appicon_margin_toscreenborder_adjustment</property>
|
||||
<property name="round_digits">0</property>
|
||||
<property name="digits">0</property>
|
||||
<property name="value_pos">right</property>
|
||||
<property name="draw_value">True</property>
|
||||
<signal name="value-changed" handler="appicon_margin_toscreenborder_scale_value_changed_cb" swapped="no"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes">App Icon Padding</property>
|
||||
@@ -104,6 +154,31 @@
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes">Highlight hovering app icons</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="highlight_appicon_hover_button">
|
||||
<property name="receives_default">True</property>
|
||||
<property name="valign">center</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="highlight_appicon_hover_options_image">
|
||||
<property name="icon_name">emblem-system-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
<style>
|
||||
<class name="circular"/>
|
||||
</style>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSwitch" id="highlight_appicon_hover_switch">
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<object class="AdwActionRow">
|
||||
<property name="title" translatable="yes">Icon style</property>
|
||||
|
||||
Reference in New Issue
Block a user