Fix null darkmode_switch
This fixes issues with Ctrl+T and the switch not reflecting correct state when starting up -- previously, darkmode_switch was initialized in construct_toolbar() as a local variable.
This commit is contained in:
parent
5b1e88c995
commit
2c93de931b
@ -142,7 +142,7 @@ public class WriteAs.MainWindow : Gtk.ApplicationWindow {
|
|||||||
});
|
});
|
||||||
header.pack_end(publish_button);
|
header.pack_end(publish_button);
|
||||||
|
|
||||||
var darkmode_switch = new Granite.ModeSwitch.from_icon_name ("display-brightness-symbolic", "weather-clear-night-symbolic");
|
darkmode_switch = new Granite.ModeSwitch.from_icon_name ("display-brightness-symbolic", "weather-clear-night-symbolic");
|
||||||
darkmode_switch.primary_icon_tooltip_text = ("Light theme");
|
darkmode_switch.primary_icon_tooltip_text = ("Light theme");
|
||||||
darkmode_switch.secondary_icon_tooltip_text = ("Dark theme");
|
darkmode_switch.secondary_icon_tooltip_text = ("Dark theme");
|
||||||
darkmode_switch.valign = Gtk.Align.CENTER;
|
darkmode_switch.valign = Gtk.Align.CENTER;
|
||||||
|
Loading…
Reference in New Issue
Block a user