Support toggling theme with Ctrl+T
This commit is contained in:
parent
07e5f7653b
commit
c39c5e0742
@ -253,6 +253,13 @@ public class WriteAs.MainWindow : Gtk.ApplicationWindow {
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Toggle theme with Ctrl+T
|
||||||
|
accels.connect(Gdk.Key.T, Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE | Gtk.AccelFlags.LOCKED, (g,a,k,m) => {
|
||||||
|
darkmode_button.set_active(!darkmode_button.get_active());
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
accels.connect(Gdk.Key.Return, Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE | Gtk.AccelFlags.LOCKED, (g,a,k,m) => {
|
accels.connect(Gdk.Key.Return, Gdk.ModifierType.CONTROL_MASK, Gtk.AccelFlags.VISIBLE | Gtk.AccelFlags.LOCKED, (g,a,k,m) => {
|
||||||
canvas.buffer.text += "\n\n" + publish();
|
canvas.buffer.text += "\n\n" + publish();
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user