Skip to content

Commit 685ad39

Browse files
Revert changes made commited by mistake
1 parent ffd0a01 commit 685ad39

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

src/Views/DisplaysView.vala

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
public class Display.DisplaysView : Gtk.Box {
1010
public DisplaysOverlay displays_overlay;
1111

12-
private Gtk.DropDown dpi_combo;
12+
private Gtk.ComboBoxText dpi_combo;
1313
private Gtk.Box rotation_lock_box;
1414

1515
private const string TOUCHSCREEN_SETTINGS_PATH = "org.gnome.settings-daemon.peripherals.touchscreen";
@@ -34,16 +34,10 @@ public class Display.DisplaysView : Gtk.Box {
3434

3535
var dpi_label = new Gtk.Label (_("Scaling factor:"));
3636

37-
var dpi_dropdown_options = new string[3] {
38-
_("LoDPI") + " (1×)",
39-
_("HiDPI") + " (2×)",
40-
_("HiDPI") + " (3×)"
41-
};
42-
43-
dpi_combo = new Gtk.DropDown (new Gtk.StringList (dpi_dropdown_options), null);
44-
//dpi_combo.append_text (_("LoDPI") + " (1×)");
45-
//dpi_combo.append_text (_("HiDPI") + " (2×)");
46-
//dpi_combo.append_text (_("HiDPI") + " (3×)");
37+
dpi_combo = new Gtk.ComboBoxText ();
38+
dpi_combo.append_text (_("LoDPI") + " (1×)");
39+
dpi_combo.append_text (_("HiDPI") + " (2×)");
40+
dpi_combo.append_text (_("HiDPI") + " (3×)");
4741

4842
var dpi_box = new Gtk.Box (HORIZONTAL, 6) {
4943
margin_top = 6,
@@ -136,11 +130,11 @@ public class Display.DisplaysView : Gtk.Box {
136130
apply_button.sensitive = false;
137131
});
138132

139-
dpi_combo.selected = (int)monitor_manager.virtual_monitors[0].scale - 1;
133+
dpi_combo.active = (int)monitor_manager.virtual_monitors[0].scale - 1;
140134

141-
dpi_combo.activate.connect (() => {
135+
dpi_combo.changed.connect (() => {
142136
try {
143-
monitor_manager.set_scale_on_all_monitors ((double)(dpi_combo.selected + 1));
137+
monitor_manager.set_scale_on_all_monitors ((double)(dpi_combo.active + 1));
144138
} catch (Error e) {
145139
show_error_dialog (e.message);
146140
}

0 commit comments

Comments
 (0)