migrate box dot options to adw preferences group

This commit is contained in:
Philipp Unger
2022-04-09 01:58:58 +02:00
parent 85c252d8ed
commit fcf1cd10c1
2 changed files with 240 additions and 537 deletions

View File

@@ -2042,7 +2042,6 @@ const Preferences = class {
}
this._builder.get_object('animate_appicon_hover_button').connect('clicked', () => {
print("BB");
let box = this._builder.get_object('animate_appicon_hover_options');
let dialog = this._createPreferencesDialog(_('App icon animation options'), box, () =>

View File

@@ -15,571 +15,275 @@
<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>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="orientation">vertical</property>
<property name="hexpand">1</property>
<property name="vexpand">1</property>
<object class="GtkScrolledWindow" id="box_dots_options">
<property name="width-request">600</property>
<property name="height-request">600</property>
<property name="vexpand">True</property>
<child>
<object class="GtkFrame" id="frame_dots_options">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="label_xalign">0</property>
<object class="GtkBox">
<property name="orientation">vertical</property>
<property name="spacing">12</property>
<child>
<object class="GtkListBox" id="listbox_dots_options">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="selection_mode">none</property>
<object class="AdwPreferencesGroup">
<property name="margin-top">12</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<child>
<object class="GtkListBoxRow" id="listboxrow_focus_highlight">
<property name="width_request">100</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<object class="AdwActionRow">
<property name="title" translatable="yes">Highlight focused application</property>
<child>
<object class="GtkGrid" id="grid_focus_highlight">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="row_spacing">12</property>
<property name="column_spacing">32</property>
<child>
<object class="GtkLabel" id="focus_highlight_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Highlight focused application</property>
<property name="xalign">0</property>
<layout>
<property name="row">0</property>
<property name="column">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkSwitch" id="focus_highlight_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
<layout>
<property name="row">0</property>
<property name="column">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkGrid" id="grid_focus_highlight_options">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">12</property>
<property name="row_spacing">8</property>
<child>
<object class="GtkLabel" id="focus_highlight_dominant_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Icon dominant color</property>
<property name="xalign">0</property>
<layout>
<property name="row">0</property>
<property name="column">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkSwitch" id="focus_highlight_dominant_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkLabel" id="focus_highlight_color_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Custom color</property>
<property name="xalign">0</property>
<layout>
<property name="row">1</property>
<property name="column">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkColorButton" id="focus_highlight_color_colorbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">end</property>
<layout>
<property name="row">1</property>
<property name="column">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel" id="focus_highlight_opacity_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Highlight opacity</property>
<property name="xalign">0</property>
<layout>
<property name="row">2</property>
<property name="column">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkSpinButton" id="focus_highlight_opacity_spinbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="text">5</property>
<property name="adjustment">focus_highlight_opacity_adjustment</property>
<property name="value">5</property>
<layout>
<property name="row">2</property>
<property name="column">1</property>
</layout>
</object>
</child>
<layout>
<property name="row">1</property>
<property name="column">0</property>
<property name="column-span">2</property>
</layout>
</object>
</child>
<object class="GtkSwitch" id="focus_highlight_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup" id="grid_focus_highlight_options">
<property name="margin-top">12</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<child>
<object class="GtkListBoxRow" id="listboxrow_dot_size">
<property name="width_request">100</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<object class="AdwActionRow">
<property name="title" translatable="yes">Icon dominant color</property>
<child>
<object class="GtkGrid" id="grid_dot_size">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="column_spacing">32</property>
<child>
<object class="GtkLabel" id="dot_size_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Indicator size (px)</property>
<property name="xalign">0</property>
<layout>
<property name="row">0</property>
<property name="column">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkSpinButton" id="dot_size_spinbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="text">0</property>
<property name="adjustment">dot_size_adjustment</property>
<layout>
<property name="row">0</property>
<property name="column">1</property>
</layout>
</object>
</child>
<object class="GtkSwitch" id="focus_highlight_dominant_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow" id="listboxrow_dot_dominant">
<property name="width_request">100</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<object class="AdwActionRow" id="focus_highlight_color_label">
<property name="title" translatable="yes">Custom color</property>
<child>
<object class="GtkGrid" id="grid_dot_dominant">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="column_spacing">32</property>
<child>
<object class="GtkLabel" id="dot_dominant_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Indicator color - Icon Dominant</property>
<property name="xalign">0</property>
<layout>
<property name="row">0</property>
<property name="column">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkSwitch" id="dot_color_dominant_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
<layout>
<property name="row">0</property>
<property name="column">1</property>
</layout>
</object>
</child>
<object class="GtkColorButton" id="focus_highlight_color_colorbutton">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkListBoxRow" id="listboxrow_dot_color">
<property name="width_request">100</property>
<property name="height_request">80</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<object class="AdwActionRow">
<property name="title" translatable="yes">Highlight opacity</property>
<child>
<object class="GtkBox" id="box_dot_color">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">12</property>
<property name="margin_end">12</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="dot_color_override_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="dot_color_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Indicator color - Override Theme</property>
<property name="xalign">0</property>
</object>
</child>
<child>
<object class="GtkSwitch" id="dot_color_override_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkGrid" id="grid_dot_color">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="row_spacing">4</property>
<property name="column_spacing">32</property>
<child>
<object class="GtkLabel" id="dot_color_1_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">1 window open (or ungrouped)</property>
<property name="xalign">0</property>
<layout>
<property name="row">0</property>
<property name="column">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkBox" id="dot_color_1_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<child>
<object class="GtkButton" id="dot_color_apply_all_button">
<property name="label" translatable="yes">Apply to all</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
</child>
<child>
<object class="GtkColorButton" id="dot_color_1_colorbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">end</property>
</object>
</child>
<layout>
<property name="row">0</property>
<property name="column">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel" id="dot_color_2_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">2 windows open</property>
<property name="xalign">0</property>
<layout>
<property name="row">1</property>
<property name="column">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel" id="dot_color_3_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">3 windows open</property>
<property name="xalign">0</property>
<layout>
<property name="row">2</property>
<property name="column">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel" id="dot_color_4_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">4+ windows open</property>
<property name="xalign">0</property>
<layout>
<property name="row">3</property>
<property name="column">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkColorButton" id="dot_color_2_colorbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">end</property>
<layout>
<property name="row">1</property>
<property name="column">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkColorButton" id="dot_color_3_colorbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">end</property>
<layout>
<property name="row">2</property>
<property name="column">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkColorButton" id="dot_color_4_colorbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">end</property>
<layout>
<property name="row">3</property>
<property name="column">1</property>
</layout>
</object>
</child>
</object>
</child>
<child>
<object class="GtkBox" id="dot_color_unfocused_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="dot_color_unfocused_different_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">12</property>
<child>
<object class="GtkLabel" id="dot_color_unfocused_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Use different for unfocused</property>
<property name="xalign">0</property>
</object>
</child>
<child>
<object class="GtkSwitch" id="dot_color_unfocused_different_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="GtkGrid" id="grid_dot_color_unfocused">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_start">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="row_spacing">4</property>
<property name="column_spacing">32</property>
<child>
<object class="GtkLabel" id="dot_color_unfocused_1_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">1 window open (or ungrouped)</property>
<property name="xalign">0</property>
<layout>
<property name="row">0</property>
<property name="column">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkBox" id="dot_color_unfocused_1_box">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">end</property>
<child>
<object class="GtkButton" id="dot_color_unfocused_apply_all_button">
<property name="label" translatable="yes">Apply to all</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
</object>
</child>
<child>
<object class="GtkColorButton" id="dot_color_unfocused_1_colorbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">end</property>
</object>
</child>
<layout>
<property name="row">0</property>
<property name="column">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel" id="dot_color_unfocused_2_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">2 windows open</property>
<property name="xalign">0</property>
<layout>
<property name="row">1</property>
<property name="column">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkColorButton" id="dot_color_unfocused_2_colorbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">end</property>
<layout>
<property name="row">1</property>
<property name="column">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel" id="dot_color_unfocused_3_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">3 windows open</property>
<property name="xalign">0</property>
<layout>
<property name="row">2</property>
<property name="column">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkColorButton" id="dot_color_unfocused_3_colorbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">end</property>
<layout>
<property name="row">2</property>
<property name="column">1</property>
</layout>
</object>
</child>
<child>
<object class="GtkLabel" id="dot_color_unfocused_4_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">4+ windows open</property>
<property name="xalign">0</property>
<layout>
<property name="row">3</property>
<property name="column">0</property>
</layout>
</object>
</child>
<child>
<object class="GtkColorButton" id="dot_color_unfocused_4_colorbutton">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">end</property>
<layout>
<property name="row">3</property>
<property name="column">1</property>
</layout>
</object>
</child>
</object>
</child>
</object>
</child>
<object class="GtkSpinButton" id="focus_highlight_opacity_spinbutton">
<property name="valign">center</property>
<property name="text">5</property>
<property name="adjustment">focus_highlight_opacity_adjustment</property>
<property name="value">5</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<property name="margin-top">12</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Indicator size (px)</property>
<child>
<object class="GtkSpinButton" id="dot_size_spinbutton">
<property name="valign">center</property>
<property name="text">0</property>
<property name="adjustment">dot_size_adjustment</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Indicator color - Icon Dominant</property>
<child>
<object class="GtkSwitch" id="dot_color_dominant_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup">
<property name="margin-top">12</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Indicator color - Override Theme</property>
<child>
<object class="GtkSwitch" id="dot_color_override_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup" id="grid_dot_color">
<property name="margin-top">12</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">1 window open (or ungrouped)</property>
<child>
<object class="GtkButton" id="dot_color_apply_all_button">
<property name="valign">center</property>
<property name="label" translatable="yes">Apply to all</property>
</object>
</child>
<child>
<object class="GtkColorButton" id="dot_color_1_colorbutton">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">2 windows open</property>
<child>
<object class="GtkColorButton" id="dot_color_2_colorbutton">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">3 windows open</property>
<child>
<object class="GtkColorButton" id="dot_color_3_colorbutton">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">4+ windows open</property>
<child>
<object class="GtkColorButton" id="dot_color_4_colorbutton">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="AdwPreferencesGroup" id="dot_color_unfocused_box">
<property name="margin-top">12</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Use different for unfocused</property>
<child>
<object class="GtkSwitch" id="dot_color_unfocused_different_switch">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
<!-- TODO sensitivity of this group has to be connected to dot_color_override_switch -->
<child>
<object class="AdwPreferencesGroup" id="grid_dot_color_unfocused">
<property name="margin-top">12</property>
<property name="margin-bottom">12</property>
<property name="margin-start">12</property>
<property name="margin-end">12</property>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">1 window open (or ungrouped)</property>
<child>
<object class="GtkButton" id="dot_color_unfocused_apply_all_button">
<property name="valign">center</property>
<property name="label" translatable="yes">Apply to all</property>
</object>
</child>
<child>
<object class="GtkColorButton" id="dot_color_unfocused_1_colorbutton">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">2 windows open</property>
<child>
<object class="GtkColorButton" id="dot_color_unfocused_2_colorbutton">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">3 windows open</property>
<child>
<object class="GtkColorButton" id="dot_color_unfocused_3_colorbutton">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">4+ windows open</property>
<child>
<object class="GtkColorButton" id="dot_color_unfocused_4_colorbutton">
<property name="valign">center</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
</object>