|
6 | 6 | */ |
7 | 7 |
|
8 | 8 | public class Jorts.PreferencesView : Gtk.Box { |
9 | | - public Gtk.Switch scribbly_toggle; |
10 | | - public Gtk.Switch hidebar_toggle; |
11 | 9 | //public Gtk.Button reset_button; |
12 | 10 | private Granite.Toast toast; |
13 | 11 | public Gtk.Button close_button; |
|
41 | 39 |
|
42 | 40 | debug ("Built UI. Lets do connects and binds"); |
43 | 41 |
|
44 | | - var scribbly_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6); |
| 42 | + var scribbly_box = new Jorts.SettingsSwitch ( |
| 43 | + _("Make unfocused notes unreadable"), |
| 44 | + _("If enabled, unfocused sticky notes become unreadable to protect their content from peeking eyes (Ctrl+H)"), |
| 45 | + "scribbly-mode-active"); |
45 | 46 |
|
46 | | - scribbly_toggle = new Gtk.Switch () { |
47 | | - halign = Gtk.Align.END, |
48 | | - hexpand = true, |
49 | | - valign = Gtk.Align.CENTER, |
50 | | - }; |
51 | | - |
52 | | - var scribbly_label = new Granite.HeaderLabel (_("Make unfocused notes unreadable")) { |
53 | | - mnemonic_widget = scribbly_toggle, |
54 | | - secondary_text = _("If enabled, unfocused sticky notes become unreadable to protect their content from peeking eyes (Ctrl+H)") |
55 | | - }; |
56 | | - |
57 | | - scribbly_box.append (scribbly_label); |
58 | | - scribbly_box.append (scribbly_toggle); |
59 | 47 | settingsbox.append (scribbly_box); |
60 | 48 |
|
61 | 49 |
|
62 | 50 | /*************************************************/ |
63 | 51 | /* hidebar Toggle */ |
64 | 52 | /*************************************************/ |
65 | 53 |
|
66 | | - var hidebar_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 6); |
67 | | - |
68 | | - hidebar_toggle = new Gtk.Switch () { |
69 | | - halign = Gtk.Align.END, |
70 | | - hexpand = true, |
71 | | - valign = Gtk.Align.CENTER, |
72 | | - }; |
73 | | - |
74 | | - var hidebar_label = new Granite.HeaderLabel (_("Hide buttons")) { |
75 | | - mnemonic_widget = hidebar_toggle, |
76 | | - secondary_text = _("If enabled, hides the bottom bar in sticky notes. Keyboard shortcuts will still function (Ctrl+T)") |
77 | | - }; |
| 54 | + var hidebar_box = new Jorts.SettingsSwitch ( |
| 55 | + _("Hide buttons"), |
| 56 | + _("If enabled, hides the bottom bar in sticky notes. Keyboard shortcuts will still function (Ctrl+T)"), |
| 57 | + "hide-bar"); |
78 | 58 |
|
79 | | - hidebar_box.append (hidebar_label); |
80 | | - hidebar_box.append (hidebar_toggle); |
81 | 59 | settingsbox.append (hidebar_box); |
82 | 60 |
|
83 | 61 |
|
|
0 commit comments