Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Tom Perez
2020-05-17 00:23:36 -07:00
15 changed files with 559 additions and 488 deletions

View File

@@ -298,208 +298,6 @@
</packing>
</child>
</object>
<object class="GtkBox" id="box_multimon_multi_options">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkFrame" id="frame_multimon_multi_options">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label_xalign">0</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkListBox" id="listbox_multimon_multi_options">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="selection_mode">none</property>
<child>
<object class="GtkListBoxRow" id="listboxrow_multimon_multi_isolate_monitor">
<property name="width_request">100</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkGrid" id="grid_multimon_multi_isolate_monitor">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="margin_right">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="row_spacing">12</property>
<property name="column_spacing">32</property>
<child>
<object class="GtkLabel" id="multimon_multi_isolate_monitor_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Isolate monitors</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="multimon_multi_isolate_monitor_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow" id="listboxrow_multimon_multi_show_favorites">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkGrid" id="grid_multimon_multi_show_favorites">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="margin_right">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="row_spacing">12</property>
<property name="column_spacing">32</property>
<child>
<object class="GtkLabel" id="multimon_multi_show_favorites_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Display favorite applications on all monitors</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="multimon_multi_show_favorites_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow" id="listboxrow_multimon_multi_show_clock">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkGrid" id="grid_multimon_multi_show_clock">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="margin_right">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="row_spacing">12</property>
<property name="column_spacing">32</property>
<child>
<object class="GtkLabel" id="multimon_multi_show_clock_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Display the clock on all monitors</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="multimon_multi_show_clock_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow" id="listboxrow_multimon_multi_show_status_menu">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkGrid" id="grid_multimon_multi_show_status_menu">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="margin_right">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="row_spacing">12</property>
<property name="column_spacing">32</property>
<child>
<object class="GtkLabel" id="multimon_multi_show_status_menu_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Display the status menu on all monitors</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="multimon_multi_show_status_menu_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<object class="GtkBox" id="box_secondarymenu_options">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -2308,7 +2106,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Time (ms) before showing (300 is default)</property>
<property name="label" translatable="yes">Time (ms) before showing (400 is default)</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
</object>
@@ -3936,6 +3734,54 @@
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkListBoxRow" id="listboxrow_show_applications_esc_key">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkGrid" id="grid_show_applications_esc_key">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="margin_right">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="column_spacing">32</property>
<child>
<object class="GtkSwitch" id="show_applications_esc_key_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="show_applications_esc_key_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Override escape key and return to desktop</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<object class="GtkAdjustment" id="show_showdesktop_delay_adjustment">
<property name="upper">5000</property>
@@ -4714,6 +4560,7 @@
<property name="margin_right">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="row_spacing">6</property>
<property name="column_spacing">32</property>
<child>
<object class="GtkLabel" id="multimon_multi_label">
@@ -4730,54 +4577,90 @@
</packing>
</child>
<child>
<object class="GtkBox" id="multimon_multi_box">
<object class="GtkSwitch" id="multimon_multi_switch">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">6</property>
<child>
<object class="GtkButton" id="multimon_multi_options_button">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="xalign">0.46000000834465027</property>
<child>
<object class="GtkImage" id="image_multimon_multi_options">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="icon_name">emblem-system-symbolic</property>
</object>
</child>
<style>
<class name="circular"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="multimon_multi_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="multimon_multi_show_status_menu_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="multimon_multi_show_clock_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="multimon_multi_show_status_menu_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="multimon_multi_show_clock_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="stockgs_top_panel_description">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="margin_top">6</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">For the following 2 options, "additional" refers to panels that are displayed in addition to the gnome-shell top panel.</property>
<property name="wrap">True</property>
<property name="max_width_chars">40</property>
<property name="xalign">0</property>
<style>
<class name="dim-label"/>
</style>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</object>
</child>
</object>
@@ -5909,6 +5792,19 @@
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="show_running_apps_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Show running applications</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="show_runnning_apps_switch">
<property name="visible">True</property>
@@ -5916,17 +5812,30 @@
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="multimon_multi_show_favorites_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="show_running_apps_label">
<object class="GtkLabel" id="multimon_multi_show_favorites_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Show running applications</property>
<property name="label" translatable="yes">Show favorite applications on secondary panels</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
</object>
<packing>
@@ -6354,6 +6263,7 @@
<property name="margin_right">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="row_spacing">6</property>
<property name="column_spacing">32</property>
<child>
<object class="GtkSwitch" id="isolate_workspaces_switch">
@@ -6381,6 +6291,32 @@
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="multimon_multi_isolate_monitor_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="multimon_multi_isolate_monitor_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Isolate monitors</property>
<property name="use_markup">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
</object>
</child>
</object>
@@ -7344,31 +7280,6 @@
<property name="top_attach">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="stockgs_panelbtn_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Activate panel menu buttons (e.g. date menu) on click only</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="stockgs_panelbtn_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="stockgs_hotcorner_label">
<property name="visible">True</property>
@@ -7379,7 +7290,7 @@
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
@@ -7391,9 +7302,59 @@
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">3</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="stockgs_panelbtn_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Activate panel menu buttons (e.g. date menu) on click only</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="stockgs_panelbtn_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="stockgs_top_panel_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Keep original gnome-shell top panel</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="stockgs_top_panel_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
</packing>
</child>
</object>
</child>
</object>

View File

@@ -59,6 +59,9 @@ const T4 = 'overviewWindowDragEndTimeout';
const T5 = 'switchWorkspaceTimeout';
const T6 = 'displayProperIndicatorTimeout';
//right padding defined for .overview-label in stylesheet.css
const TITLE_RIGHT_PADDING = 8;
let LABEL_GAP = 5;
let MAX_INDICATORS = 4;
var DEFAULT_PADDING_SIZE = 4;
@@ -165,7 +168,7 @@ var taskbarAppIcon = Utils.defineClass({
this._updateWindowTitle();
this._updateWindowTitleStyle();
this._scaleFactorChangedId = St.ThemeContext.get_for_stage(global.stage).connect('changed', () => this._updateWindowTitleStyle());
this._scaleFactorChangedId = Utils.getStageTheme().connect('changed', () => this._updateWindowTitleStyle());
box.add_child(this._dtpIconContainer);
box.add_child(this._windowTitle);
@@ -313,7 +316,7 @@ var taskbarAppIcon = Utils.defineClass({
global.window_manager.disconnect(this._switchWorkspaceId);
if(this._scaleFactorChangedId)
St.ThemeContext.get_for_stage(global.stage).disconnect(this._scaleFactorChangedId);
Utils.getStageTheme().disconnect(this._scaleFactorChangedId);
if (this._hoverChangeId) {
this.actor.disconnect(this._hoverChangeId);
@@ -340,6 +343,10 @@ var taskbarAppIcon = Utils.defineClass({
}
},
updateTitleStyle: function() {
this._updateWindowTitleStyle();
},
// Update indicator and target for minimization animation
updateIcon: function() {
@@ -467,14 +474,17 @@ var taskbarAppIcon = Utils.defineClass({
_updateWindowTitleStyle: function() {
if (this._windowTitle) {
let useFixedWidth = Me.settings.get_boolean('group-apps-use-fixed-width');
let maxLabelWidth = Me.settings.get_int('group-apps-label-max-width') *
St.ThemeContext.get_for_stage(global.stage).scale_factor;
let variableWidth = !useFixedWidth || Panel.checkIfVertical() || this.dtpPanel.taskbar.fullScrollView;
let fontWeight = Me.settings.get_string('group-apps-label-font-weight');
let scaleFactor = Utils.getScaleFactor();
let maxLabelWidth = Me.settings.get_int('group-apps-label-max-width') * scaleFactor;
this._windowTitle[(maxLabelWidth > 0 ? 'show' : 'hide')]();
this._windowTitle.clutter_text.natural_width = useFixedWidth ? maxLabelWidth : 0;
this._windowTitle.clutter_text.natural_width_set = useFixedWidth;
this._windowTitle.set_width(variableWidth ? -1 : maxLabelWidth + TITLE_RIGHT_PADDING * scaleFactor);
this._windowTitle.set_style('font-size: ' + Me.settings.get_int('group-apps-label-font-size') + 'px;' +
'font-weight: ' + fontWeight + ';' +
(useFixedWidth ? '' : 'max-width: ' + maxLabelWidth + 'px;') +
@@ -504,7 +514,7 @@ var taskbarAppIcon = Utils.defineClass({
let highlightMargin = isWide ? Me.settings.get_int('dot-size') : 0;
if(!this.window) {
let containerWidth = this._dtpIconContainer.get_width() / St.ThemeContext.get_for_stage(global.stage).scale_factor;
let containerWidth = this._dtpIconContainer.get_width() / Utils.getScaleFactor();;
let backgroundSize = containerWidth + "px " +
(containerWidth - (pos == DOT_POSITION.BOTTOM ? highlightMargin : 0)) + "px;";
@@ -948,7 +958,7 @@ var taskbarAppIcon = Utils.defineClass({
},
_getRunningIndicatorSize: function() {
return Me.settings.get_int('dot-size') * St.ThemeContext.get_for_stage(global.stage).scale_factor;
return Me.settings.get_int('dot-size') * Utils.getScaleFactor();
},
_getRunningIndicatorColor: function(isFocused) {
@@ -1155,11 +1165,10 @@ var taskbarAppIcon = Utils.defineClass({
// We apply an overall scale factor that might come from a HiDPI monitor.
// Clutter dimensions are in physical pixels, but CSS measures are in logical
// pixels, so make sure to consider the scale.
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
// Set the font size to something smaller than the whole icon so it is
// still visible. The border radius is large to make the shape circular
let [minWidth, natWidth] = this._dtpIconContainer.get_preferred_width(-1);
let font_size = Math.round(Math.max(12, 0.3 * natWidth) / scaleFactor);
let font_size = Math.round(Math.max(12, 0.3 * natWidth) / Utils.getScaleFactor());
let size = Math.round(font_size * 1.3);
let label = bin.child;
let style = 'font-size: ' + font_size + 'px;' +
@@ -1631,7 +1640,7 @@ var ShowAppsIconWrapper = Utils.defineClass({
if (customIconPath) {
this._iconActor.gicon = new Gio.FileIcon({ file: Gio.File.new_for_path(customIconPath) });
}
return this._iconActor;
};

View File

@@ -74,7 +74,7 @@ function _enable() {
// Disable Ubuntu Dock
let extensionOrder = (extensionSystem.extensionOrder || extensionSystem._extensionOrder);
St.ThemeContext.get_for_stage(global.stage).get_theme().unload_stylesheet(ubuntuDock.stylesheet);
Utils.getStageTheme().get_theme().unload_stylesheet(ubuntuDock.stylesheet);
ubuntuDock.stateObj.disable();
disabledUbuntuDock = true;
ubuntuDock.state = 2; //ExtensionState.DISABLED

View File

@@ -157,7 +157,7 @@ var Intellihide = Utils.defineClass({
_changeEnabledStatus: function() {
let intellihide = Me.settings.get_boolean('intellihide');
let onlySecondary = Me.settings.get_boolean('intellihide-only-secondary');
let enabled = intellihide && (this._dtpPanel.isSecondary || !onlySecondary);
let enabled = intellihide && !(this._dtpPanel.isPrimary && onlySecondary);
if (this.enabled !== enabled) {
this[enabled ? 'enable' : 'disable']();

204
panel.js
View File

@@ -117,7 +117,7 @@ var dtpPanel = Utils.defineClass({
Name: 'DashToPanel-Panel',
Extends: St.Widget,
_init: function(panelManager, monitor, panelBox, isSecondary) {
_init: function(panelManager, monitor, panelBox, isStandalone) {
let position = getPosition();
this.callParent('_init', { layout_manager: new Clutter.BinLayout() });
@@ -130,11 +130,19 @@ var dtpPanel = Utils.defineClass({
this.monitor = monitor;
this.panelBox = panelBox;
this.isSecondary = isSecondary;
// when the original gnome-shell top panel is kept, all panels are "standalone",
// 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 || (Me.settings.get_boolean('stockgs-keep-top-panel') &&
monitor == panelManager.dtpPrimaryMonitor);
this._sessionStyle = null;
this._unmappedButtons = [];
this.cornerSize = 0;
if (isSecondary) {
if (isStandalone) {
this.panel = new St.Widget({ name: 'panel', reactive: true });
this.statusArea = this.panel.statusArea = {};
@@ -163,6 +171,10 @@ var dtpPanel = Utils.defineClass({
this._setPanelMenu('show-status-menu-all-monitors', 'aggregateMenu', dtpSecondaryAggregateMenu, this._rightBox, true);
this._setPanelMenu('show-clock-all-monitors', 'dateMenu', DateMenu.DateMenuButton, this._centerBox, true);
if (this.statusArea.aggregateMenu) {
setMenuArrow(this.statusArea.aggregateMenu._indicators.get_last_child(), position);
}
this.panel.add_child(this._leftBox);
this.panel.add_child(this._centerBox);
this.panel.add_child(this._rightBox);
@@ -182,15 +194,16 @@ var dtpPanel = Utils.defineClass({
this.panel._leftCorner = this.panel._leftCorner || new Panel.PanelCorner(St.Side.LEFT);
this.panel._rightCorner = this.panel._rightCorner || new Panel.PanelCorner(St.Side.RIGHT);
Utils.wrapActor(this.panel._leftCorner);
Utils.wrapActor(this.panel._rightCorner);
if (isSecondary) {
if (isStandalone) {
this.panel.add_child(this.panel._leftCorner.actor);
this.panel.add_child(this.panel._rightCorner.actor);
this.panel._rightCorner.setStyleParent(this._rightBox);
}
}
Utils.wrapActor(this.panel._leftCorner || 0);
Utils.wrapActor(this.panel._rightCorner || 0);
this.add_child(this.panel.actor);
if (Main.panel._onButtonPress || Main.panel._tryDragWindow) {
@@ -254,7 +267,7 @@ var dtpPanel = Utils.defineClass({
this._setPanelPosition();
if (!this.isSecondary) {
if (!this.isStandalone) {
if (this.panel.vfunc_allocate) {
this._panelConnectId = 0;
Utils.hookVfunc(this.panel.__proto__, 'allocate', (box, flags) => this._mainPanelAllocate(0, box, flags));
@@ -316,6 +329,8 @@ var dtpPanel = Utils.defineClass({
this._setClockLocation(Me.settings.get_string('location-clock'));
this._displayShowDesktopButton(Me.settings.get_boolean('show-showdesktop-button'));
this._setRightCornerStyle();
this.panel.actor.add_style_class_name('dashtopanelMainPanel ' + getOrientation());
// Since Gnome 3.8 dragging an app without having opened the overview before cause the attemp to
@@ -333,7 +348,7 @@ var dtpPanel = Utils.defineClass({
this._signalsHandler.add(
// this is to catch changes to the theme or window scale factor
[
St.ThemeContext.get_for_stage(global.stage),
Utils.getStageTheme(),
'changed',
() => this._resetGeometry()
],
@@ -388,6 +403,8 @@ var dtpPanel = Utils.defineClass({
}
]);
this._setSearchEntryOffset(this.geom.w);
if (this.statusArea.dateMenu) {
this._formatVerticalClock();
@@ -428,6 +445,7 @@ var dtpPanel = Utils.defineClass({
this.menuManager._changeMenu = this.menuManager._oldChangeMenu;
this._myPanelGhost.get_parent().remove_actor(this._myPanelGhost);
this._setSearchEntryOffset(0);
panelBoxes.forEach(b => delete this[b].allocate);
this._unmappedButtons.forEach(a => this._disconnectVisibleId(a));
@@ -438,14 +456,13 @@ var dtpPanel = Utils.defineClass({
this._dateMenuIndicatorPadContraints.forEach(c => indicatorPad.add_constraint(c));
}
if (!this.isSecondary) {
this._setVertical(this.panel.actor, false);
if (!this.isStandalone) {
this.statusArea.dateMenu._clockDisplay.text = this.statusArea.dateMenu._clock.clock;
this._setVertical(this.panel.actor, false);
['vertical', 'horizontal', 'dashtopanelMainPanel'].forEach(c => this.panel.actor.remove_style_class_name(c));
if(!Main.sessionMode.isLocked) {
this._setActivitiesButtonVisible(true);
this._setClockLocation("BUTTONSLEFT");
@@ -462,6 +479,9 @@ var dtpPanel = Utils.defineClass({
this._displayShowDesktopButton(false);
this._toggleCornerStyle(this.panel._leftCorner, true);
this._toggleCornerStyle(this.panel._rightCorner, true);
delete Utils.getIndicators(this.statusArea.aggregateMenu._volume)._dtpIgnoreScroll;
setMenuArrow(this.statusArea.aggregateMenu._indicators.get_last_child(), St.Side.TOP);
@@ -480,6 +500,10 @@ var dtpPanel = Utils.defineClass({
} else {
this._removePanelMenu('dateMenu');
this._removePanelMenu('aggregateMenu');
if (this.panel._rightCorner && this.panel._rightCorner._buttonStyleChangedSignalId) {
this.panel._rightCorner._button.disconnect(this.panel._rightCorner._buttonStyleChangedSignalId);
}
}
Main.ctrlAltTabManager.removeGroup(this);
@@ -619,6 +643,21 @@ var dtpPanel = Utils.defineClass({
this._myPanelGhost.set_size(this.width, checkIfVertical() ? 1 : this.height);
},
_setSearchEntryOffset: function(offset) {
if (this.isPrimary) {
//In the overview, when the panel is vertical the search-entry is the only element
//that doesn't natively take into account the size of a side dock, as it is always
//centered relatively to the monitor. This looks misaligned, adjust it here so it
//is centered like the rest of the overview elements.
let paddingSide = getPosition() == St.Side.LEFT ? 'left' : 'right';
let scaleFactor = Utils.getScaleFactor();
let style = offset ? 'padding-' + paddingSide + ':' + (offset / scaleFactor) + 'px;' : null;
let searchEntry = Main.overview._searchEntry || Main.overview._overview._searchEntry;
searchEntry.get_parent().set_style(style);
}
},
_adjustForOverview: function() {
let isFocusedMonitor = this.panelManager.checkIfFocusedMonitor(this.monitor);
let isOverview = !!Main.overview.visibleTarget;
@@ -649,20 +688,27 @@ var dtpPanel = Utils.defineClass({
if (checkIfVertical()) {
this._refreshVerticalAlloc();
this._setSearchEntryOffset(this.geom.w);
}
},
getGeometry: function() {
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor || 1;
let scaleFactor = Utils.getScaleFactor();
let panelBoxTheme = this.panelBox.get_theme_node();
let lrPadding = panelBoxTheme.get_padding(St.Side.RIGHT) + panelBoxTheme.get_padding(St.Side.LEFT);
let tbPadding = panelBoxTheme.get_padding(St.Side.TOP) + panelBoxTheme.get_padding(St.Side.BOTTOM);
let topPadding = panelBoxTheme.get_padding(St.Side.TOP);
let tbPadding = topPadding + panelBoxTheme.get_padding(St.Side.BOTTOM);
let position = getPosition();
let gsTopPanelOffset = 0;
let x = 0, y = 0;
let w = 0, h = 0;
size = Me.settings.get_int('panel-size') * scaleFactor;
if (Me.settings.get_boolean('stockgs-keep-top-panel') && Main.layoutManager.primaryMonitor == this.monitor) {
gsTopPanelOffset = Main.layoutManager.panelBox.height - topPadding;
}
if (checkIfVertical()) {
if (!Me.settings.get_boolean('group-apps')) {
// add window title width and side padding of _dtpIconContainer when vertical
@@ -674,7 +720,7 @@ var dtpPanel = Utils.defineClass({
varCoord = { c1: 'y1', c2: 'y2' };
w = size;
h = this.monitor.height - tbPadding;
h = this.monitor.height - tbPadding - gsTopPanelOffset;
} else {
sizeFunc = 'get_preferred_width';
fixedCoord = { c1: 'y1', c2: 'y2' };
@@ -686,10 +732,10 @@ var dtpPanel = Utils.defineClass({
if (position == St.Side.TOP || position == St.Side.LEFT) {
x = this.monitor.x;
y = this.monitor.y;
y = this.monitor.y + gsTopPanelOffset;
} else if (position == St.Side.RIGHT) {
x = this.monitor.x + this.monitor.width - size - lrPadding;
y = this.monitor.y;
y = this.monitor.y + gsTopPanelOffset;
} else { //BOTTOM
x = this.monitor.x;
y = this.monitor.y + this.monitor.height - size - tbPadding;
@@ -698,6 +744,8 @@ var dtpPanel = Utils.defineClass({
return {
x: x, y: y,
w: w, h: h,
lrPadding: lrPadding,
tbPadding: tbPadding,
position: position
};
},
@@ -785,21 +833,26 @@ var dtpPanel = Utils.defineClass({
if (this.geom.position == St.Side.TOP) {
let childBoxLeftCorner = new Clutter.ActorBox();
let [ , cornerSize] = this.panel._leftCorner.actor[sizeFunc](-1);
childBoxLeftCorner[varCoord.c1] = 0;
childBoxLeftCorner[varCoord.c2] = cornerSize;
childBoxLeftCorner[fixedCoord.c1] = panelAllocFixedSize;
childBoxLeftCorner[fixedCoord.c2] = panelAllocFixedSize + cornerSize;
let childBoxRightCorner = new Clutter.ActorBox();
[ , cornerSize] = this.panel._rightCorner.actor[sizeFunc](-1);
childBoxRightCorner[varCoord.c1] = panelAllocVarSize - cornerSize;
let currentCornerSize = this.cornerSize;
[ , this.cornerSize] = this.panel._leftCorner.actor[sizeFunc](-1);
childBoxLeftCorner[varCoord.c1] = 0;
childBoxLeftCorner[varCoord.c2] = this.cornerSize;
childBoxLeftCorner[fixedCoord.c1] = panelAllocFixedSize;
childBoxLeftCorner[fixedCoord.c2] = panelAllocFixedSize + this.cornerSize;
childBoxRightCorner[varCoord.c1] = panelAllocVarSize - this.cornerSize;
childBoxRightCorner[varCoord.c2] = panelAllocVarSize;
childBoxRightCorner[fixedCoord.c1] = panelAllocFixedSize;
childBoxRightCorner[fixedCoord.c2] = panelAllocFixedSize + cornerSize;
childBoxRightCorner[fixedCoord.c2] = panelAllocFixedSize + this.cornerSize;
this.panel._leftCorner.actor.allocate(childBoxLeftCorner, flags);
this.panel._rightCorner.actor.allocate(childBoxRightCorner, flags);
if (this.cornerSize != currentCornerSize) {
this._setPanelClip();
}
}
},
@@ -818,12 +871,17 @@ var dtpPanel = Utils.defineClass({
this.panel.actor[(St.Side[p] == this.geom.position ? 'add' : 'remove') + '_style_class_name'](cssName);
});
this._timeoutsHandler.add([T7, 0, () => Utils.setClip(clipContainer, clipContainer.x, clipContainer.y, this.panelBox.width, this.panelBox.height)]);
this._setPanelClip(clipContainer);
Main.layoutManager._updateHotCorners();
Main.layoutManager._updatePanelBarrier(this);
},
_setPanelClip: function(clipContainer) {
clipContainer = clipContainer || this.panelBox.get_parent();
this._timeoutsHandler.add([T7, 0, () => Utils.setClip(clipContainer, clipContainer.x, clipContainer.y, this.panelBox.width, this.panelBox.height + this.cornerSize)]);
},
_onButtonPress: function(actor, event) {
let type = event.type();
let isPress = type == Clutter.EventType.BUTTON_PRESS;
@@ -881,7 +939,9 @@ var dtpPanel = Utils.defineClass({
},
_onBoxActorAdded: function(box) {
this._setClockLocation(Me.settings.get_string('location-clock'));
if (!this._setClockLocation(Me.settings.get_string('location-clock'))) {
this._setRightCornerStyle();
}
if (checkIfVertical()) {
this._setVertical(box, true);
@@ -970,41 +1030,43 @@ var dtpPanel = Utils.defineClass({
_formatVerticalClock: function() {
// https://github.com/GNOME/gnome-desktop/blob/master/libgnome-desktop/gnome-wall-clock.c#L310
let datetime = this.statusArea.dateMenu._clock.clock;
let datetimeParts = datetime.split('');
let time = datetimeParts[1];
let clockText = this.statusArea.dateMenu._clockDisplay.clutter_text;
let setClockText = text => {
let stacks = text instanceof Array;
let separator = '\n<span size="xx-small">‧‧</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 (this.statusArea.dateMenu) {
let datetime = this.statusArea.dateMenu._clock.clock;
let datetimeParts = datetime.split('');
let time = datetimeParts[1];
let clockText = this.statusArea.dateMenu._clockDisplay.clutter_text;
let setClockText = text => {
let stacks = text instanceof Array;
let separator = '\n<span size="xx-small">‧‧</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 (!time) {
datetimeParts = datetime.split(' ');
time = datetimeParts.pop();
datetimeParts = [datetimeParts.join(' '), time];
}
if (!setClockText(datetime) &&
!setClockText(datetimeParts) &&
!setClockText(time)) {
let timeParts = time.split('');
if (!this._clockFormat) {
this._clockFormat = Me.desktopSettings.get_string('clock-format');
if (!time) {
datetimeParts = datetime.split(' ');
time = datetimeParts.pop();
datetimeParts = [datetimeParts.join(' '), time];
}
if (this._clockFormat == '12h') {
timeParts.push.apply(timeParts, timeParts.pop().split(' '));
}
if (!setClockText(datetime) &&
!setClockText(datetimeParts) &&
!setClockText(time)) {
let timeParts = time.split('');
setClockText(timeParts);
if (!this._clockFormat) {
this._clockFormat = Me.desktopSettings.get_string('clock-format');
}
if (this._clockFormat == '12h') {
timeParts.push.apply(timeParts, timeParts.pop().split(' '));
}
setClockText(timeParts);
}
}
},
@@ -1038,6 +1100,25 @@ var dtpPanel = Utils.defineClass({
destination['set_child_' + (loc.indexOf('RIGHT') > 0 ? 'above' : 'below') + '_sibling'](dateMenuContainer, refSibling);
destination.queue_relayout();
this._setRightCornerStyle();
return 1;
},
_setRightCornerStyle: function() {
if (this.panel._rightCorner) {
this._toggleCornerStyle(
this.panel._rightCorner,
(this.statusArea.aggregateMenu &&
this._rightBox.get_last_child() == this.statusArea.aggregateMenu.container)
);
}
},
_toggleCornerStyle: function(corner, visible) {
if (corner) {
corner.actor[(visible ? 'remove' : 'add') + '_style_class_name']('hidden');
}
},
_displayShowDesktopButton: function (isVisible) {
@@ -1086,6 +1167,7 @@ var dtpPanel = Utils.defineClass({
this._rightBox.remove_child(this._showDesktopButton);
this._showDesktopButton.destroy();
this._showDesktopButton = null;
this._setRightCornerStyle();
}
},
@@ -1282,7 +1364,5 @@ var dtpSecondaryAggregateMenu = Utils.defineClass({
menuLayout.addSizeChild(this._power.menu.actor);
menuLayout.addSizeChild(this._system.menu.actor);
setMenuArrow(this._indicators.get_last_child(), getPosition());
},
});

View File

@@ -70,20 +70,19 @@ var dtpPanelManager = Utils.defineClass({
if(dtpPrimaryIndex < 0 || dtpPrimaryIndex >= Main.layoutManager.monitors.length)
dtpPrimaryIndex = Main.layoutManager.primaryIndex;
let dtpPrimaryMonitor = Main.layoutManager.monitors[dtpPrimaryIndex];
this.dtpPrimaryMonitor = Main.layoutManager.monitors[dtpPrimaryIndex];
this.proximityManager = new Proximity.ProximityManager();
Utils.wrapActor(Main.panel);
Utils.wrapActor(Main.overview.dash || 0);
this.primaryPanel = this._createPanel(dtpPrimaryMonitor);
this.primaryPanel = this._createPanel(this.dtpPrimaryMonitor, Me.settings.get_boolean('stockgs-keep-top-panel'));
this.allPanels = [ this.primaryPanel ];
this.overview.enable(this.primaryPanel);
if (Me.settings.get_boolean('multi-monitors')) {
Main.layoutManager.monitors.filter(m => m != dtpPrimaryMonitor).forEach(m => {
Main.layoutManager.monitors.filter(m => m != this.dtpPrimaryMonitor).forEach(m => {
this.allPanels.push(this._createPanel(m, true));
});
}
@@ -96,8 +95,8 @@ var dtpPanelManager = Utils.defineClass({
let leftOrRight = (panelPosition == St.Side.LEFT || panelPosition == St.Side.RIGHT);
p.panelBox.set_size(
leftOrRight ? -1 : p.monitor.width,
leftOrRight ? p.monitor.height : -1
leftOrRight ? -1 : p.geom.w + p.geom.lrPadding,
leftOrRight ? p.geom.h + p.geom.tbPadding : -1
);
this._findPanelMenuButtons(p.panelBox).forEach(pmb => this._adjustPanelMenuButton(pmb, p.monitor, panelPosition));
@@ -116,7 +115,7 @@ var dtpPanelManager = Utils.defineClass({
});
}
this.setFocusedMonitor(dtpPrimaryMonitor);
this.setFocusedMonitor(this.dtpPrimaryMonitor);
if (Panel.checkIfVertical()) {
Main.wm._getPositionForDirection = newGetPositionForDirection;
@@ -231,7 +230,8 @@ var dtpPanelManager = Utils.defineClass({
'changed::multi-monitors',
'changed::isolate-monitors',
'changed::taskbar-position',
'changed::panel-position'
'changed::panel-position',
'changed::stockgs-keep-top-panel'
],
() => this._reset()
],
@@ -282,7 +282,7 @@ var dtpPanelManager = Utils.defineClass({
Main.layoutManager._untrackActor(p.panelBox);
Main.layoutManager.removeChrome(clipContainer);
if (p.isSecondary) {
if (p.isStandalone) {
p.panelBox.destroy();
} else {
p.panelBox.remove_child(p);
@@ -302,17 +302,17 @@ var dtpPanelManager = Utils.defineClass({
delete Main.wm._getPositionForDirection;
if (Main.layoutManager.primaryMonitor) {
Main.layoutManager.panelBox.set_position(Main.layoutManager.primaryMonitor.x, Main.layoutManager.primaryMonitor.y);
Main.layoutManager.panelBox.set_size(Main.layoutManager.primaryMonitor.width, -1);
}
if (reset) return;
this._setKeyBindings(false);
this._signalsHandler.destroy();
if (Main.layoutManager.primaryMonitor) {
Main.layoutManager.panelBox.set_position(Main.layoutManager.primaryMonitor.x, Main.layoutManager.primaryMonitor.y);
Main.layoutManager.panelBox.set_size(Main.layoutManager.primaryMonitor.width, -1);
}
Main.layoutManager._updateHotCorners = this._oldUpdateHotCorners;
Main.layoutManager._updateHotCorners();
@@ -355,8 +355,9 @@ var dtpPanelManager = Utils.defineClass({
},
setFocusedMonitor: function(monitor, ignoreRelayout) {
this._needsIconAllocate = 1;
if (!this.checkIfFocusedMonitor(monitor)) {
this._needsIconAllocate = 1;
Main.overview.viewSelector._workspacesDisplay._primaryIndex = monitor.index;
Main.overview._overview.clear_constraints();
@@ -372,12 +373,12 @@ var dtpPanelManager = Utils.defineClass({
return Main.overview.viewSelector._workspacesDisplay._primaryIndex == monitor.index;
},
_createPanel: function(monitor, isSecondary) {
_createPanel: function(monitor, isStandalone) {
let panelBox;
let panel;
let clipContainer = new Clutter.Actor();
if (isSecondary) {
if (isStandalone) {
panelBox = new St.BoxLayout({ name: 'panelBox' });
} else {
panelBox = Main.layoutManager.panelBox;
@@ -390,7 +391,7 @@ var dtpPanelManager = Utils.defineClass({
clipContainer.add_child(panelBox);
Main.layoutManager.trackChrome(panelBox, { trackFullscreen: true, affectsStruts: true, affectsInputRegion: true });
panel = new Panel.dtpPanel(this, monitor, panelBox, isSecondary);
panel = new Panel.dtpPanel(this, monitor, panelBox, isStandalone);
panelBox.add(panel);
panel.enable();
@@ -453,7 +454,7 @@ var dtpPanelManager = Utils.defineClass({
},
_removePanelBarriers: function(panel) {
if (panel.isSecondary && panel._rightPanelBarrier) {
if (panel.isStandalone && panel._rightPanelBarrier) {
panel._rightPanelBarrier.destroy();
}
@@ -704,7 +705,7 @@ function newUpdateHotCorners() {
function newUpdatePanelBarrier(panel) {
let barriers = {
_rightPanelBarrier: [(panel.isSecondary ? panel : this)],
_rightPanelBarrier: [(panel.isStandalone ? panel : this)],
_leftPanelBarrier: [panel]
};
@@ -775,7 +776,7 @@ function newUpdatePanelBarrier(panel) {
}
function _newLookingGlassResize() {
let topOffset = Panel.getPosition() == St.Side.TOP ? Panel.size : 0;
let topOffset = Panel.getPosition() == St.Side.TOP ? Panel.size : 32;
this._oldResize();
Utils.wrapActor(this);

View File

@@ -42,7 +42,6 @@ msgid "Left, with floating center plugin icons"
msgstr "A la izquierda, con iconos flotantes centrados"
#: prefs.js:214
#, fuzzy
msgid "Center, fixed in middle of monitor"
msgstr "Centrado, fijo en mitad del monitor"
@@ -83,7 +82,6 @@ msgid "Bottom of system indicators"
msgstr "Abajo de los indicadores del sistema"
#: prefs.js:222
#, fuzzy
msgid "Right of system indicators"
msgstr "A la derecha de los indicadores del sistema"
@@ -92,7 +90,6 @@ msgid "Top of taskbar"
msgstr "Arriba de la barra de tareas"
#: prefs.js:223
#, fuzzy
msgid "Left of taskbar"
msgstr "A la izquierda de la barra de tareas"
@@ -101,12 +98,10 @@ msgid "Bottom of taskbar"
msgstr "Abajo de la barra de tareas"
#: prefs.js:224
#, fuzzy
msgid "Right of taskbar"
msgstr "A la derecha de la barra de tareas"
#: prefs.js:230
#, fuzzy
msgid "Show Desktop button height (px)"
msgstr "Alto del botón Mostrar Escritorio (px)"
@@ -165,12 +160,10 @@ msgid "Customize middle-click behavior"
msgstr "Personalizar comportamiento del botón central"
#: prefs.js:1473
#, fuzzy
msgid "Customize panel scroll behavior"
msgstr "Personalizar comportamiento del desplazamiento del panel"
#: prefs.js:1509
#, fuzzy
msgid "Customize icon scroll behavior"
msgstr "Personalizar comportamiento del desplazamiento de los iconos"
@@ -211,7 +204,6 @@ msgid "Windows"
msgstr "Ventanas"
#: appIcons.js:1745
#, fuzzy
msgid "Power options"
msgstr "Energía"
@@ -236,7 +228,6 @@ msgid "Terminal"
msgstr "Terminal"
#: appIcons.js:1778
#, fuzzy
msgid "System monitor"
msgstr "Monitor del sistema"
@@ -282,7 +273,6 @@ msgid "Version %s (%s) is available"
msgstr "La versión %s (%s) está disponible"
#: update.js:63
#, fuzzy
msgid "Details"
msgstr "Mostrar detalles"
@@ -335,7 +325,6 @@ msgid "Shift+Click action"
msgstr "Acción de Mayúsculas+Click"
#: Settings.ui.h:4
#, fuzzy
msgid "Raise windows"
msgstr "Elevar ventanas"
@@ -376,12 +365,10 @@ msgid "Shift+Middle-Click action"
msgstr "Acción de Mayúsculas+Botón-Central"
#: Settings.ui.h:15
#, fuzzy
msgid "Isolate monitors"
msgstr "Aislar los espacios de trabajo"
#: Settings.ui.h:16
#, fuzzy
msgid "Display favorite applications on all monitors"
msgstr "Mostrar aplicaciones favoritas en todos los espacios de trabajo"
@@ -418,12 +405,10 @@ msgid "Highlight opacity"
msgstr "Opacidad de resaltado"
#: Settings.ui.h:25
#, fuzzy
msgid "Indicator size (px)"
msgstr "Tamaño del indicador (px)"
#: Settings.ui.h:26
#, fuzzy
msgid "Indicator color - Icon Dominant"
msgstr "Color del indicador - Predominar el icono"
@@ -460,7 +445,6 @@ msgid "Font size (px) of the application titles (default is 14)"
msgstr "Tamaño de la fuente (px) para los títulos de aplicación (14 por defecto)"
#: Settings.ui.h:35
#, fuzzy
msgid "Font weight of application titles"
msgstr "Tamaño de la fuente para los títulos de aplicación"
@@ -534,7 +518,6 @@ msgid "Maximized windows"
msgstr "Ventanas maximizadas"
#: Settings.ui.h:52
#, fuzzy
msgid "Require pressure at the edge of the screen to reveal the panel"
msgstr "Requerir presión en el borde de la pantalla para mostrar el panel"
@@ -575,7 +558,6 @@ msgid "Delay before hiding the panel (ms)"
msgstr "Tiempo antes de ocultar el panel (ms)"
#: Settings.ui.h:62
#, fuzzy
msgid "Delay before enabling intellihide on start (ms)"
msgstr "Tiempo antes de habilitar el panel inteligente (ms)"
@@ -584,22 +566,18 @@ msgid "Time (ms) before showing (100 is default)"
msgstr "Tiempo (ms) antes de mostrar (100 por defecto)"
#: Settings.ui.h:64
#, fuzzy
msgid "Animation time (ms)"
msgstr "Tiempo de la animación (ms)"
#: Settings.ui.h:65
#, fuzzy
msgid "Time (ms) before hiding (100 is default)"
msgstr "Tiempo (ms) antes de ocultar (100 por defecto)"
#: Settings.ui.h:66
#, fuzzy
msgid "Immediate on application icon click"
msgstr "Pulsación inmediata en icono de aplicación"
#: Settings.ui.h:67
#, fuzzy
msgid "Middle click on the preview to close the window"
msgstr "Usar el botón central en la vista rápida para cerrar la ventana"
@@ -608,12 +586,10 @@ msgid "Window previews preferred size (px)"
msgstr "Tamaño por defecto de las vistas rápidas (px)"
#: Settings.ui.h:69
#, fuzzy
msgid "Window previews aspect ratio Y (height)"
msgstr "Altura de la vista rápida de ventanas"
#: Settings.ui.h:70
#, fuzzy
msgid "Window previews padding (px)"
msgstr "Relleno (px) de la vista rápida de ventanas"
@@ -706,7 +682,6 @@ msgid "Fixed"
msgstr ""
#: Settings.ui.h:93
#, fuzzy
msgid "Window previews aspect ratio X (width)"
msgstr "Anchura de la vista rápida de ventanas"
@@ -731,22 +706,18 @@ msgid "Top"
msgstr "Arriba"
#: Settings.ui.h:99
#, fuzzy
msgid "Display window preview headers"
msgstr "Mostrar los títulos de las ventanas en las vistas rápidas"
#: Settings.ui.h:100
#, fuzzy
msgid "Font size (px) of the preview titles"
msgstr "Tamaño de letra (px) de los títulos de aplicación (14 por defecto)"
#: Settings.ui.h:101
#, fuzzy
msgid "Font weight of the preview titles"
msgstr "Color de letra de los títulos de aplicación"
#: Settings.ui.h:102
#, fuzzy
msgid "Font color of the preview titles"
msgstr "Color de letra de los títulos de aplicación"
@@ -853,7 +824,6 @@ msgid "Shortcut to show the overlay for 2 seconds"
msgstr "Atajo para mostrar el número de aplicación por 2 segundos"
#: Settings.ui.h:125
#, fuzzy
msgid "Show window previews on hotkey"
msgstr "Mostrar vista rápida de ventanas al pasar con el ratón"
@@ -862,7 +832,6 @@ msgid "Show previews when the application have multiple instances"
msgstr "Mostrar vistas previas cuando la aplicación tiene múltiples instancias"
#: Settings.ui.h:127
#, fuzzy
msgid "Number row"
msgstr "Fila numérica"
@@ -875,7 +844,6 @@ msgid "Both"
msgstr "Ambos"
#: Settings.ui.h:130
#, fuzzy
msgid "Hotkeys are activated with"
msgstr "Usar atajos de teclado para activar aplicaciones"
@@ -896,7 +864,6 @@ msgid "Custom Show Applications image icon"
msgstr "Icono <i>Mostrar aplicaciones</i> personalizado"
#: Settings.ui.h:135
#, fuzzy
msgid "Show Applications icon side padding (px)"
msgstr "Tamaño de relleno (px) de <i>Mostrar aplicaciones<i>"
@@ -905,12 +872,10 @@ msgid "Reveal the desktop when hovering the Show Desktop button"
msgstr "Mostrar escritorio al colocar el botón <i>Mostrar Escritorio<i>"
#: Settings.ui.h:137
#, fuzzy
msgid "Delay before revealing the desktop (ms)"
msgstr "Tiempo antes de ocultar el panel (ms)"
#: Settings.ui.h:138
#, fuzzy
msgid "Fade duration (ms)"
msgstr "Tiempo de ocultación (ms)"
@@ -928,7 +893,6 @@ msgid "Change opacity to (%)"
msgstr "Cambiar la opacidad a (%)"
#: Settings.ui.h:143
#, fuzzy
msgid "Opacity change animation duration (ms)"
msgstr "Duración de las animaciones (ms)"
@@ -969,7 +933,6 @@ msgid "Hide and reveal the panel according to preferences"
msgstr "Ocultar y mostrar el panel de acuerdo con las preferencias"
#: Settings.ui.h:153
#, fuzzy
msgid "Position"
msgstr "Posición"
@@ -1081,7 +1044,6 @@ msgid "Show favorite applications"
msgstr "Mostrar aplicaciones favoritas"
#: Settings.ui.h:183
#, fuzzy
msgid "Show running applications"
msgstr "Mostrar aplicaciones en ejecución"
@@ -1116,7 +1078,6 @@ msgid "Show window previews on hover"
msgstr "Mostrar vista rápida de ventanas al pasar con el ratón"
#: Settings.ui.h:191
#, fuzzy
msgid "Show tooltip on hover"
msgstr "Mostrar barra de herramientas al pasar con el ratón"
@@ -1141,7 +1102,6 @@ msgid "Click action"
msgstr "Acción de pulsación"
#: Settings.ui.h:197
#, fuzzy
msgid "Toggle windows"
msgstr "Alternar ventanas"
@@ -1154,12 +1114,10 @@ msgid "Behavior when mouse scrolling over the panel."
msgstr "Comportamiento cuando el ratón de desplaza en el panel"
#: Settings.ui.h:200
#, fuzzy
msgid "Scroll icon action"
msgstr "Acción al desplazar iconos"
#: Settings.ui.h:201
#, fuzzy
msgid "Behavior when mouse scrolling over an application icon."
msgstr "Comportamiento cuando el ratón se desplaza sobre el icono de una aplicación"
@@ -1172,7 +1130,6 @@ msgid "Switch workspace"
msgstr "Cambiar espacio de trabajo"
#: Settings.ui.h:204
#, fuzzy
msgid "Cycle windows"
msgstr "Alternar entre ventanas"

113
prefs.js
View File

@@ -230,10 +230,7 @@ const Settings = new Lang.Class({
showDesktopWidthLabel.set_text(isVertical ? _('Show Desktop button height (px)') : _('Show Desktop button width (px)'));
},
_bindSettings: function() {
// Position and style panel
// Position option
_setPositionRadios: function() {
let position = this._settings.get_string('panel-position');
switch (position) {
@@ -251,6 +248,13 @@ const Settings = new Lang.Class({
break;
}
},
_bindSettings: function() {
// Position and style panel
// Position option
this._setPositionRadios();
this._settings.connect('changed::panel-position', () => this._updateVerticalRelatedOptions());
this._updateVerticalRelatedOptions();
@@ -528,16 +532,6 @@ const Settings = new Lang.Class({
'active',
Gio.SettingsBindFlags.DEFAULT);
this._settings.bind('multi-monitors',
this._builder.get_object('multimon_multi_options_button'),
'sensitive',
Gio.SettingsBindFlags.DEFAULT);
this._settings.bind('isolate-monitors',
this._builder.get_object('multimon_multi_isolate_monitor_switch'),
'active',
Gio.SettingsBindFlags.DEFAULT);
this._settings.bind('show-clock-all-monitors',
this._builder.get_object('multimon_multi_show_clock_switch'),
'active',
@@ -548,47 +542,10 @@ const Settings = new Lang.Class({
'active',
Gio.SettingsBindFlags.DEFAULT);
this._settings.bind('show-favorites-all-monitors',
this._builder.get_object('multimon_multi_show_favorites_switch'),
'active',
Gio.SettingsBindFlags.DEFAULT);
if (monitors.length === 1) {
this._builder.get_object('multimon_listbox').set_sensitive(false);
this._builder.get_object('multimon_multi_switch').set_active(false);
}
this._builder.get_object('multimon_multi_options_button').connect('clicked', Lang.bind(this, function() {
let dialog = new Gtk.Dialog({ title: _('Multi-monitors options'),
transient_for: this.widget.get_toplevel(),
use_header_bar: true,
modal: true });
// GTK+ leaves positive values for application-defined response ids.
// Use +1 for the reset action
dialog.add_button(_('Reset to defaults'), 1);
let box = this._builder.get_object('box_multimon_multi_options');
dialog.get_content_area().add(box);
dialog.connect('response', Lang.bind(this, function(dialog, id) {
if (id == 1) {
// restore default settings
this._settings.set_value('isolate-monitors', this._settings.get_default_value('isolate-monitors'));
this._settings.set_value('show-favorites-all-monitors', this._settings.get_default_value('show-favorites-all-monitors'));
this._settings.set_value('show-clock-all-monitors', this._settings.get_default_value('show-clock-all-monitors'));
this._settings.set_value('show-status-menu-all-monitors', this._settings.get_default_value('show-status-menu-all-monitors'));
} else {
// remove the settings box so it doesn't get destroyed;
dialog.get_content_area().remove(box);
dialog.destroy();
}
return;
}));
dialog.show_all();
}));
//dynamic opacity
this._settings.bind('trans-use-custom-bg',
this._builder.get_object('trans_bg_switch'),
@@ -937,6 +894,7 @@ const Settings = new Lang.Class({
// restore default settings
this._settings.set_value('show-apps-icon-side-padding', this._settings.get_default_value('show-apps-icon-side-padding'));
this._builder.get_object('show_applications_side_padding_spinbutton').set_value(this._settings.get_int('show-apps-icon-side-padding'));
this._settings.set_value('show-apps-override-escape', this._settings.get_default_value('show-apps-override-escape'));
handleIconChange.call(this, null);
} else {
// remove the settings box so it doesn't get destroyed;
@@ -957,6 +915,10 @@ const Settings = new Lang.Class({
this._builder.get_object('application_button_animation_button'),
'sensitive',
Gio.SettingsBindFlags.DEFAULT);
this._settings.bind('show-apps-override-escape',
this._builder.get_object('show_applications_esc_key_switch'),
'active',
Gio.SettingsBindFlags.DEFAULT);
this._settings.bind('show-activities-button',
this._builder.get_object('show_activities_button_switch'),
'active',
@@ -1058,6 +1020,16 @@ const Settings = new Lang.Class({
'active',
Gio.SettingsBindFlags.DEFAULT);
this._settings.bind('show-favorites-all-monitors',
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',
Gio.SettingsBindFlags.DEFAULT);
this._settings.bind('show-running-apps',
this._builder.get_object('show_runnning_apps_switch'),
'active',
@@ -1288,6 +1260,11 @@ const Settings = new Lang.Class({
'active',
Gio.SettingsBindFlags.DEFAULT);
this._settings.bind('isolate-monitors',
this._builder.get_object('multimon_multi_isolate_monitor_switch'),
'active',
Gio.SettingsBindFlags.DEFAULT);
this._settings.bind('group-apps',
this._builder.get_object('group_apps_switch'),
'active',
@@ -1755,6 +1732,40 @@ const Settings = new Lang.Class({
'active',
Gio.SettingsBindFlags.DEFAULT);
this._settings.bind('stockgs-keep-top-panel',
this._builder.get_object('stockgs_top_panel_switch'),
'active',
Gio.SettingsBindFlags.DEFAULT);
var maybeDisableTopPosition = () => {
let keepTopPanel = this._settings.get_boolean('stockgs-keep-top-panel');
let topRadio = this._builder.get_object('position_top_button');
topRadio.set_sensitive(!keepTopPanel);
topRadio.set_tooltip_text(keepTopPanel ? _('Unavailable when gnome-shell top panel is present') : '');
if (keepTopPanel && this._settings.get_string('panel-position') == 'TOP') {
this._settings.set_string('panel-position', "BOTTOM");
this._setPositionRadios();
}
};
var setGsStockPanelOptions = () => {
let keepTopPanel = this._settings.get_boolean('stockgs-keep-top-panel');
this._builder.get_object('stockgs_top_panel_description')[keepTopPanel ? 'show' : 'hide']();
this._builder.get_object('multimon_multi_show_clock_label').set_text(keepTopPanel ? _('Display the clock on additional panels') : _('Display the clock on secondary panels'));
this._builder.get_object('multimon_multi_show_status_menu_label').set_text(keepTopPanel ? _('Display the status menu on additional panels') : _('Display the status menu on secondary panels'));
};
this._settings.connect('changed::stockgs-keep-top-panel', () => {
setGsStockPanelOptions();
maybeDisableTopPosition();
});
setGsStockPanelOptions();
maybeDisableTopPosition();
this._settings.bind('stockgs-panelbtn-click-only',
this._builder.get_object('stockgs_panelbtn_switch'),
'active',

View File

@@ -419,7 +419,7 @@ var ProgressIndicator = Utils.defineClass({
},
_drawProgressOverlay: function(area) {
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
let scaleFactor = Utils.getScaleFactor();
let [surfaceWidth, surfaceHeight] = area.get_surface_size();
let cr = area.get_context();

View File

@@ -192,6 +192,11 @@
<summary>Keep dash</summary>
<description>Whether to keep the stock gnome-shell dash while in overview</description>
</key>
<key type="b" name="stockgs-keep-top-panel">
<default>false</default>
<summary>Keep top panel</summary>
<description>Whether to keep the stock gnome-shell top panel</description>
</key>
<key type="b" name="stockgs-panelbtn-click-only">
<default>false</default>
<summary>Panel menu buttons require click</summary>
@@ -367,6 +372,11 @@
<summary>Show Applications icon side padding</summary>
<description>Customize the Show Applications icon side padding</description>
</key>
<key type="b" name="show-apps-override-escape">
<default>true</default>
<summary>Override escape key</summary>
<description>Override the escape key to return to the desktop when entering the overview using the Show Applications button</description>
</key>
<key type="b" name="animate-show-apps">
<default>true</default>
<summary>Animate Show Applications from the desktop</summary>
@@ -448,7 +458,7 @@
<description>Show or hide favorite application icons in the dash</description>
</key>
<key type="i" name="show-window-previews-timeout">
<default>300</default>
<default>400</default>
<summary>Icon enter display time</summary>
<description>Amount of time after entering icon to wait before displaying window preview if icon is not clicked or mouse has not left.</description>
</key>

View File

@@ -35,6 +35,7 @@
}
#dashtopanelScrollview .app-well-app .overview-label {
/* must match TITLE_RIGHT_PADDING in apppicons.js */
padding-right: 8px;
}
@@ -120,7 +121,7 @@
background-color: rgba(200, 200, 200, .4);
}
.panel-corner:active, .panel-corner:overview, .panel-corner:focus {
.panel-corner.hidden:active, .panel-corner.hidden:overview, .panel-corner.hidden:focus {
-panel-corner-border-color: rgba(0, 0, 0, .001);
}
#dashtopanelScrollview .badge {

View File

@@ -93,7 +93,7 @@ var taskbarActor = Utils.defineClass({
let [, showAppsNatSize] = showAppsButton[Panel.sizeFunc](availFixedSize);
let [, natSize] = this[Panel.sizeFunc](availFixedSize);
let childBox = new Clutter.ActorBox();
let orientation = Panel.getOrientation().toLowerCase();
let orientation = Panel.getOrientation();
childBox[Panel.varCoord.c1] = box[Panel.varCoord.c1];
childBox[Panel.fixedCoord.c1] = box[Panel.fixedCoord.c1];
@@ -106,9 +106,9 @@ var taskbarActor = Utils.defineClass({
childBox[Panel.varCoord.c2] = Math.min(availVarSize, natSize);
scrollview.allocate(childBox, flags);
let [hvalue, , hupper, , , hpageSize] = scrollview[orientation[0] + 'scroll'].adjustment.get_values();
hupper = Math.floor(hupper);
scrollview._dtpFadeSize = hupper > hpageSize ? this._delegate.iconSize : 0;
let [value, , upper, , , pageSize] = scrollview[orientation[0] + 'scroll'].adjustment.get_values();
upper = Math.floor(upper);
scrollview._dtpFadeSize = upper > pageSize ? this._delegate.iconSize : 0;
if (this._currentBackgroundColor !== this._delegate.dtpPanel.dynamicTransparency.currentBackgroundColor) {
this._currentBackgroundColor = this._delegate.dtpPanel.dynamicTransparency.currentBackgroundColor;
@@ -120,10 +120,10 @@ var taskbarActor = Utils.defineClass({
}
childBox[Panel.varCoord.c1] = box[Panel.varCoord.c1] + showAppsNatSize;
childBox[Panel.varCoord.c2] = childBox[Panel.varCoord.c1] + (hvalue > 0 ? scrollview._dtpFadeSize : 0);
childBox[Panel.varCoord.c2] = childBox[Panel.varCoord.c1] + (value > 0 ? scrollview._dtpFadeSize : 0);
leftFade.allocate(childBox, flags);
childBox[Panel.varCoord.c1] = box[Panel.varCoord.c2] - (hvalue + hpageSize < hupper ? scrollview._dtpFadeSize : 0);
childBox[Panel.varCoord.c1] = box[Panel.varCoord.c2] - (value + pageSize < upper ? scrollview._dtpFadeSize : 0);
childBox[Panel.varCoord.c2] = box[Panel.varCoord.c2];
rightFade.allocate(childBox, flags);
},
@@ -175,6 +175,7 @@ var taskbar = Utils.defineClass({
this._resetHoverTimeoutId = 0;
this._ensureAppIconVisibilityTimeoutId = 0;
this._labelShowing = false;
this.fullScrollView = 0;
let isVertical = Panel.checkIfVertical();
@@ -217,7 +218,8 @@ var taskbar = Utils.defineClass({
this._container.add_actor(this._showAppsIcon);
this._container.add_actor(this._scrollView);
let fadeStyle = 'background-gradient-direction:' + Panel.getOrientation();
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,
@@ -241,12 +243,8 @@ var taskbar = Utils.defineClass({
y_align: St.Align.START, x_align:rtl?St.Align.END:St.Align.START
});
// Update minimization animation target position on allocation of the
// container and on scrollview change.
this._box.connect('notify::allocation', Lang.bind(this, this._updateAppIcons));
let scrollViewAdjustment = this._scrollView.hscroll.adjustment;
scrollViewAdjustment.connect('notify::value', Lang.bind(this, this._updateAppIcons));
let adjustment = this._scrollView[orientation[0] + 'scroll'].adjustment;
this._workId = Main.initializeDeferredWork(this._box, Lang.bind(this, this._redisplay));
this._settings = new Gio.Settings({ schema_id: 'org.gnome.shell' });
@@ -357,6 +355,32 @@ var taskbar = Utils.defineClass({
'changed::taskbar-locked'
],
() => this.resetAppIcons()
],
[
adjustment,
'notify::upper',
() => {
// Update minimization animation target position on scrollview change.
this._updateAppIcons();
// When applications are ungrouped and there is some empty space on the horizontal taskbar,
// force a fixed label width to prevent the icons from "wiggling" when an animation runs
// (adding or removing an icon). When the taskbar is full, revert to a dynamic label width
// to allow them to resize and make room for new icons.
if (!isVertical && !this.isGroupApps) {
let initial = this.fullScrollView;
if (!this.fullScrollView && Math.floor(adjustment.upper) > adjustment.page_size) {
this.fullScrollView = adjustment.page_size;
} else if (adjustment.page_size < this.fullScrollView) {
this.fullScrollView = 0;
}
if (initial != this.fullScrollView) {
this._getAppIcons().forEach(a => a.updateTitleStyle());
}
}
}
]
);
@@ -380,12 +404,7 @@ var taskbar = Utils.defineClass({
_onScrollEvent: function(actor, event) {
// Event coordinates are relative to the stage but can be transformed
// as the actor will only receive events within his bounds.
let stage_x, stage_y, ok, event_x, event_y, actor_w, actor_h;
[stage_x, stage_y] = event.get_coords();
[ok, event_x, event_y] = actor.transform_stage_point(stage_x, stage_y);
[actor_w, actor_h] = actor.get_size();
let orientation = Panel.getOrientation();
// reset timeout to avid conflicts with the mousehover event
if (this._ensureAppIconVisibilityTimeoutId>0) {
@@ -399,7 +418,7 @@ var taskbar = Utils.defineClass({
let adjustment, delta;
adjustment = this._scrollView.get_hscroll_bar().get_adjustment();
adjustment = this._scrollView[orientation[0] + 'scroll'].get_adjustment();
let increment = adjustment.step_increment;
@@ -835,7 +854,7 @@ var taskbar = Utils.defineClass({
this._updateAppIcons();
// This will update the size, and the corresponding number for each icon on the primary panel
if (!this.dtpPanel.isSecondary) {
if (this.dtpPanel.isPrimary) {
this._updateNumberOverlay();
}
@@ -848,7 +867,7 @@ var taskbar = Utils.defineClass({
_checkIfShowingFavorites: function() {
return Me.settings.get_boolean('show-favorites') &&
(!this.dtpPanel.isSecondary || Me.settings.get_boolean('show-favorites-all-monitors'));
(this.dtpPanel.isPrimary || Me.settings.get_boolean('show-favorites-all-monitors'));
},
_getRunningApps: function() {
@@ -1091,6 +1110,19 @@ var taskbar = Utils.defineClass({
});
if (this.showAppsButton.checked) {
if (Me.settings.get_boolean('show-apps-override-escape')) {
//override escape key to return to the desktop when entering the overview using the showapps button
Main.overview.viewSelector._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 this.__proto__._onStageKeyPress.call(this, actor, event);
};
}
// force spring animation triggering.By default the animation only
// runs if we are already inside the overview.
if (!Main.overview._shown) {
@@ -1135,6 +1167,7 @@ var taskbar = Utils.defineClass({
let overviewHiddenId = Main.overview.connect('hidden', () => {
Main.overview.disconnect(overviewHiddenId);
this.dtpPanel.panelManager.setFocusedMonitor(this.dtpPanel.panelManager.primaryPanel.monitor, true);
delete Main.overview.viewSelector._onStageKeyPress;
});
// Finally show the overview

View File

@@ -71,7 +71,7 @@ var DynamicTransparency = Utils.defineClass({
_bindSignals: function() {
this._signalsHandler.add(
[
St.ThemeContext.get_for_stage(global.stage),
Utils.getStageTheme(),
'changed',
() => this._updateAllAndSet()
],

View File

@@ -294,6 +294,14 @@ var getWorkspaceCount = function() {
return DisplayWrapper.getWorkspaceManager().n_workspaces;
};
var getStageTheme = function() {
return St.ThemeContext.get_for_stage(global.stage);
};
var getScaleFactor = function() {
return getStageTheme().scale_factor || 1;
};
var findIndex = function(array, predicate) {
if (Array.prototype.findIndex) {
return array.findIndex(predicate);

View File

@@ -416,7 +416,7 @@ var PreviewMenu = Utils.defineClass({
isLeftButtons = Meta.prefs_get_button_layout().left_buttons.indexOf(Meta.ButtonFunction.CLOSE) >= 0;
isTopHeader = Me.settings.get_string('window-preview-title-position') == 'TOP';
isManualStyling = Me.settings.get_boolean('window-preview-manual-styling');
scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
scaleFactor = Utils.getScaleFactor();
headerHeight = Me.settings.get_boolean('window-preview-show-title') ? HEADER_HEIGHT * scaleFactor : 0;
animationTime = Me.settings.get_int('window-preview-animation-time') * .001;
aspectRatio.x = {