mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-15 00:34:05 +09:00
Add option to set the window titles font color
This commit is contained in:
67
Settings.ui
67
Settings.ui
@@ -8,12 +8,6 @@
|
||||
<property name="step_increment">0.01</property>
|
||||
<property name="page_increment">0.10000000000000001</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="focus_highlight_opacity_adjustment">
|
||||
<property name="lower">5</property>
|
||||
<property name="upper">100</property>
|
||||
<property name="step_increment">5</property>
|
||||
<property name="page_increment">5</property>
|
||||
</object>
|
||||
<object class="GtkBox" id="box_middle_click_options">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
@@ -380,6 +374,18 @@
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">5</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="enter_peek_mode_timeout_adjustment">
|
||||
<property name="lower">50</property>
|
||||
<property name="upper">9999</property>
|
||||
<property name="step_increment">25</property>
|
||||
<property name="page_increment">100</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="focus_highlight_opacity_adjustment">
|
||||
<property name="lower">5</property>
|
||||
<property name="upper">100</property>
|
||||
<property name="step_increment">5</property>
|
||||
<property name="page_increment">5</property>
|
||||
</object>
|
||||
<object class="GtkBox" id="box_dots_options">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
@@ -942,12 +948,6 @@
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="enter_peek_mode_timeout_adjustment">
|
||||
<property name="lower">50</property>
|
||||
<property name="upper">9999</property>
|
||||
<property name="step_increment">25</property>
|
||||
<property name="page_increment">100</property>
|
||||
</object>
|
||||
<object class="GtkAdjustment" id="group_apps_label_font_size_adjustment">
|
||||
<property name="lower">6</property>
|
||||
<property name="upper">24</property>
|
||||
@@ -1020,6 +1020,49 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkListBoxRow" id="listbox_group_apps_label_font_color">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid_group_apps_label_font_color">
|
||||
<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="GtkLabel" id="group_apps_label_font_color_label">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="label" translatable="yes">Font color of the application titles</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="GtkColorButton" id="group_apps_label_font_color_colorbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="halign">end</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="listbox_group_apps_label_max_width">
|
||||
<property name="visible">True</property>
|
||||
|
||||
@@ -181,6 +181,7 @@ var taskbarAppIcon = new Lang.Class({
|
||||
this._dtpSettings.connect('changed::focus-highlight-color', Lang.bind(this, this._settingsChangeRefresh)),
|
||||
this._dtpSettings.connect('changed::focus-highlight-opacity', Lang.bind(this, this._settingsChangeRefresh)),
|
||||
this._dtpSettings.connect('changed::group-apps-label-font-size', Lang.bind(this, this._updateWindowTitleStyle)),
|
||||
this._dtpSettings.connect('changed::group-apps-label-font-color', Lang.bind(this, this._updateWindowTitleStyle)),
|
||||
this._dtpSettings.connect('changed::group-apps-label-max-width', Lang.bind(this, this._updateWindowTitleStyle)),
|
||||
this._dtpSettings.connect('changed::group-apps-use-fixed-width', Lang.bind(this, this._updateWindowTitleStyle)),
|
||||
this._dtpSettings.connect('changed::group-apps-underline-unfocused', Lang.bind(this, this._settingsChangeRefresh))
|
||||
@@ -418,7 +419,8 @@ var taskbarAppIcon = new Lang.Class({
|
||||
this._windowTitle.clutter_text.natural_width = useFixedWidth ? maxLabelWidth : 0;
|
||||
this._windowTitle.clutter_text.natural_width_set = useFixedWidth;
|
||||
this._windowTitle.set_style('font-size: ' + this._dtpSettings.get_int('group-apps-label-font-size') + 'px;' +
|
||||
(useFixedWidth ? '' : 'max-width: ' + maxLabelWidth + 'px;'));
|
||||
(useFixedWidth ? '' : 'max-width: ' + maxLabelWidth + 'px;') +
|
||||
'color: ' + this._dtpSettings.get_string('group-apps-label-font-color'));
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
18
prefs.js
18
prefs.js
@@ -525,6 +525,13 @@ const Settings = new Lang.Class({
|
||||
'active',
|
||||
Gio.SettingsBindFlags.DEFAULT);
|
||||
|
||||
this._builder.get_object('group_apps_label_font_color_colorbutton').connect('notify::color', Lang.bind(this, function (button) {
|
||||
let rgba = button.get_rgba();
|
||||
let css = rgba.to_string();
|
||||
let hexString = cssHexString(css);
|
||||
this._settings.set_string('group-apps-label-font-color', hexString);
|
||||
}));
|
||||
|
||||
this._settings.bind('group-apps-use-fixed-width',
|
||||
this._builder.get_object('group_apps_use_fixed_width_switch'),
|
||||
'active',
|
||||
@@ -558,6 +565,12 @@ const Settings = new Lang.Class({
|
||||
this._settings.set_int('group-apps-label-font-size', widget.get_value());
|
||||
}));
|
||||
|
||||
(function() {
|
||||
let rgba = new Gdk.RGBA();
|
||||
rgba.parse(this._settings.get_string('group-apps-label-font-color'));
|
||||
this._builder.get_object('group_apps_label_font_color_colorbutton').set_rgba(rgba);
|
||||
}).apply(this);
|
||||
|
||||
this._builder.get_object('group_apps_label_max_width_spinbutton').set_value(this._settings.get_int('group-apps-label-max-width'));
|
||||
this._builder.get_object('group_apps_label_max_width_spinbutton').connect('value-changed', Lang.bind (this, function(widget) {
|
||||
this._settings.set_int('group-apps-label-max-width', widget.get_value());
|
||||
@@ -569,6 +582,11 @@ const Settings = new Lang.Class({
|
||||
this._settings.set_value('group-apps-label-font-size', this._settings.get_default_value('group-apps-label-font-size'));
|
||||
this._builder.get_object('group_apps_label_font_size_spinbutton').set_value(this._settings.get_int('group-apps-label-font-size'));
|
||||
|
||||
this._settings.set_value('group-apps-label-font-color', this._settings.get_default_value('group-apps-label-font-color'));
|
||||
let rgba = new Gdk.RGBA();
|
||||
rgba.parse(this._settings.get_string('group-apps-label-font-color'));
|
||||
this._builder.get_object('group_apps_label_font_color_colorbutton').set_rgba(rgba);
|
||||
|
||||
this._settings.set_value('group-apps-label-max-width', this._settings.get_default_value('group-apps-label-max-width'));
|
||||
this._builder.get_object('group_apps_label_max_width_spinbutton').set_value(this._settings.get_int('group-apps-label-max-width'));
|
||||
|
||||
|
||||
@@ -212,6 +212,11 @@
|
||||
<summary>Application title font size</summary>
|
||||
<description>When the applications are ungrouped, this defines the application titles font size.</description>
|
||||
</key>
|
||||
<key type="s" name="group-apps-label-font-color">
|
||||
<default>"#dddddd"</default>
|
||||
<summary>Application title font color</summary>
|
||||
<description>When the applications are ungrouped, this defines the application titles font color.</description>
|
||||
</key>
|
||||
<key type="i" name="group-apps-label-max-width">
|
||||
<default>160</default>
|
||||
<summary>Application title max width</summary>
|
||||
|
||||
Reference in New Issue
Block a user