Added DPI stage box on mouse panel

master
vhaudiquet 1 year ago
parent 356d0b975d
commit 84735a86f0
  1. 4
      src/ui/panels/mouse-panel.c
  2. 34
      ui/panel-mouse.ui

@ -5,7 +5,8 @@ struct _MousePanel
Panel parent_instance;
GtkImage* mouse_image;
GtkLabel* mouse_name;
GtkLabel* mouse_name;
AdwPreferencesGroup* dpi_preference_group;
};
G_DEFINE_TYPE (MousePanel, mouse_panel, panel_get_type())
@ -21,6 +22,7 @@ mouse_panel_class_init(MousePanelClass* klass)
gtk_widget_class_bind_template_child(widget_class, MousePanel, mouse_image);
gtk_widget_class_bind_template_child(widget_class, MousePanel, mouse_name);
gtk_widget_class_bind_template_child(widget_class, MousePanel, dpi_preference_group);
}
static void

@ -56,37 +56,9 @@
<property name="margin-top">30</property>
<property name="valign">start</property>
<child>
<object class="GtkLabel">
<property name="halign">start</property>
<property name="justify">center</property>
<property name="label">DPI:</property>
<property name="margin-end">10</property>
<property name="valign">center</property>
</object>
</child>
<child>
<object class="GtkSpinButton" id="dpi_spinbutton">
<property name="adjustment">
<object class="GtkAdjustment" id="dpi_adjustment">
<property name="step-increment">100.0</property>
<property name="upper">26000.0</property>
<property name="value">200.0</property>
</object>
</property>
<property name="climb-rate">100.0</property>
<property name="margin-end">10</property>
<property name="margin-start">10</property>
<property name="value">200.0</property>
<property name="width-request">150</property>
</object>
</child>
<child>
<object class="GtkLabel">
<property name="halign">start</property>
<property name="justify">right</property>
<property name="label">(Maximum: 26000)</property>
<property name="margin-end">10</property>
<property name="valign">center</property>
<object class="AdwPreferencesGroup" id="dpi_preference_group">
<property name="title">DPI Stages</property>
<property name="description">DPI Stages of the mouse</property>
</object>
</child>
</object>

Loading…
Cancel
Save