Settings_panel: Prevent long translations from squashing the slider

and improve switch to be more consistent
This commit is contained in:
alfrix committed 2022-02-05 14:47:35 -03:00
1 parent 1964f13e26
commit d05ac06ad3
7 files changed
+9 -14

No files matched your search

+3 -2
View File
@@ -139,8 +139,8 @@ class SettingsPanel(ScreenPanel):
switch.set_active(self._config.get_config().getboolean(option['section'], opt_name))
switch.connect("notify::active", self.switch_config_option, option['section'], opt_name,
option['callback'] if "callback" in option else None)
switch.set_property("width-request", round(self._gtk.get_image_width()*2.5))
switch.set_property("height-request", round(self._gtk.get_image_height()*1.25))
switch.set_property("width-request", round(self._gtk.get_font_size()*7))
switch.set_property("height-request", round(self._gtk.get_font_size()*3.5))
box.add(switch)
dev.add(box)
elif option['type'] == "dropdown":
@@ -162,6 +162,7 @@ class SettingsPanel(ScreenPanel):
scale = Gtk.Scale(orientation=Gtk.Orientation.HORIZONTAL, adjustment=adj)
scale.set_hexpand(True)
scale.set_digits(0)
scale.set_property("width-request", round(self._screen.width/2.2))
scale.connect("value-changed", self.scale_moved, option['section'], opt_name)
dev.add(scale)
elif option['type'] == "printer":
+5
View File
@@ -84,6 +84,11 @@ combobox arrow {
min-width: 1em;
}
switch {
border: 0;
border-radius: 3em;
}
switch slider {
border: 0;
}
-2
View File
@@ -81,8 +81,6 @@ combobox box button {
switch {
background-color: #073642; /* base02 */
border-color: #073642; /* base02 */
border-radius: 3em;
}
switch:checked {
-5
View File
@@ -81,17 +81,12 @@ combobox box button {
switch {
background-color: #1f1f1f;
border-color: #121212;
}
switch:checked {
background-color: #849900;
}
switch slider {
border: 0;
}
entry {
background-color: #1f1f1f;
border-color: rgba(0,0,0,0);
-1
View File
@@ -59,7 +59,6 @@ combobox box button {
switch {
background-color: #1e1e1e;
border-color: #303030;
}
switch:checked {
+1 -3
View File
@@ -90,8 +90,6 @@ combobox box button {
switch {
background-color: #BDBDBD;
border-radius: 2em;
border-color: #BDBDBD
}
switch:checked {
@@ -99,7 +97,7 @@ switch:checked {
}
switch slider {
border-color: #BDBDBD;
border: .1em solid #BDBDBD;
}
entry {
-1
View File
@@ -55,7 +55,6 @@ combobox box button {
switch {
background-color: #20292F;
border: 0;
}
switch:checked {