Settings UI additions for indicator and animations

This commit is contained in:
jderose9
2017-02-17 22:11:16 -05:00
parent 7b3bc4caf9
commit 530a9e30e9
3 changed files with 842 additions and 347 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -77,7 +77,7 @@ const Settings = new Lang.Class({
},
_bindSettings: function() {
// Position and size panel
// Position and style panel
// Position option
let position = this._settings.get_string('panel-position');
@@ -129,6 +129,43 @@ const Settings = new Lang.Class({
}
this._builder.get_object('dots_style_options_button').connect('clicked', Lang.bind(this, function() {
let dialog = new Gtk.Dialog({ title: _('Running Indicator 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_dots_options');
dialog.get_content_area().add(box);
// this._builder.get_object('leave_timeout_spinbutton').set_value(this._settings.get_int('leave-timeout'));
// this._builder.get_object('leave_timeout_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
// this._settings.set_int('leave-timeout', widget.get_value());
// }));
dialog.connect('response', Lang.bind(this, function(dialog, id) {
if (id == 1) {
// restore default settings
// this._settings.set_int('leave-timeout', 100);
// this._builder.get_object('leave_timeout_spinbutton').set_value(this._settings.get_int('leave-timeout'));
} else {
// remove the settings box so it doesn't get destroyed;
dialog.get_content_area().remove(box);
dialog.destroy();
}
return;
}));
dialog.show_all();
}));
// Behavior panel
this._settings.bind('show-show-apps-button',
@@ -360,7 +397,7 @@ const Settings = new Lang.Class({
}));
// Appearance panel
// Fine-tune panel
let sizeScales = [
{objectName: 'tray_size_scale', valueName: 'tray-size', range: DEFAULT_FONT_SIZES },

View File

@@ -54,7 +54,7 @@ let DASH_ITEM_LABEL_SHOW_TIME = Dash.DASH_ITEM_LABEL_SHOW_TIME;
let DASH_ITEM_LABEL_HIDE_TIME = Dash.DASH_ITEM_LABEL_HIDE_TIME;
let DASH_ITEM_HOVER_TIMEOUT = Dash.DASH_ITEM_HOVER_TIMEOUT;
let LABEL_GAP = 5;
let RUNNING_INDICATOR_SIZE = 3;
let RUNNING_INDICATOR_SIZE = 1;
let HFADE_WIDTH = 48;
function getPosition() {