diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-05-07 20:53:09 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-05-07 20:53:09 +0200 |
commit | 7004a8b66768d6d8f9b358fc6960dab9424514ad (patch) | |
tree | 1043bc53c1bb25d386d7ebd59bb9637aa50f204c /src/menubar.vala | |
parent | 3c44cdf781d4fcb55b4e0c95043f172f218baaa7 (diff) | |
parent | bfb99d8737fd6c62fa24c6980a4d916008de17c4 (diff) | |
download | arctica-greeter-7004a8b66768d6d8f9b358fc6960dab9424514ad.tar.gz arctica-greeter-7004a8b66768d6d8f9b358fc6960dab9424514ad.tar.bz2 arctica-greeter-7004a8b66768d6d8f9b358fc6960dab9424514ad.zip |
Merge branch 'tari01-pr/dbus-server'
Attributes GH PR #46: https://github.com/ArcticaProject/arctica-greeter/pull/46
Diffstat (limited to 'src/menubar.vala')
-rw-r--r-- | src/menubar.vala | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/menubar.vala b/src/menubar.vala index d9dab66..a53b461 100644 --- a/src/menubar.vala +++ b/src/menubar.vala @@ -2,6 +2,7 @@ * * Copyright (C) 2011,2012 Canonical Ltd * Copyright (C) 2015-2017 Mike Gabriel <mike.gabriel@das-netzwerkteam.de> + * Copyright (C) 2023 Robert Tari * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 as @@ -18,6 +19,7 @@ * Authors: Robert Ancell <robert.ancell@canonical.com> * Michael Terry <michael.terry@canonical.com> * Mike Gabriel <mike.gabriel@das-netzwerkteam.de> + * Robert Tari <robert@tari.in> */ private class IndicatorMenuItem : Gtk.MenuItem @@ -176,7 +178,16 @@ public class MenuBar : Gtk.MenuBar /* Add shadow. */ var shadow_style = new Gtk.CssProvider (); - shadow_style.load_from_data ("* { box-shadow: 0px 0px 5px 5px #000000; }", -1); + + try + { + shadow_style.load_from_data ("* { box-shadow: 0px 0px 5px 5px #000000; }", -1); + } + catch (Error pError) + { + error ("Panic: Failed adding shadow: %s", pError.message); + } + this.get_style_context ().add_provider (shadow_style, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); @@ -266,7 +277,7 @@ public class MenuBar : Gtk.MenuBar hostname_item.set_sensitive (false); - hostname_item.set_right_justified (true); + hostname_item.set_halign (Gtk.Align.END); } /* Prevent dragging the window by the menubar */ @@ -601,11 +612,11 @@ public class MenuBar : Gtk.MenuBar agsettings.high_contrast = item.active; } - private void big_font_toggled_cb (Gtk.CheckMenuItem item) + /*private void big_font_toggled_cb (Gtk.CheckMenuItem item) { var agsettings = new AGSettings (); agsettings.big_font = item.active; - } + }*/ private void screen_reader_toggled_cb (Gtk.CheckMenuItem item) { @@ -644,8 +655,11 @@ public class MenuBar : Gtk.MenuBar // why we do both. Ideally this would be fixed in orca itself. var greeter = new ArcticaGreeter (); greeter.orca_needs_kick = true; - Timeout.add_seconds (1, () => { - Signal.emit_by_name ((get_toplevel () as Gtk.Window).get_focus ().get_accessible (), "focus-event", true); + Timeout.add_seconds (1, () => + { + Gtk.Window pWindow = (Gtk.Window) get_toplevel (); + Signal.emit_by_name (pWindow.get_focus ().get_accessible (), "focus-event", true); + return false; }); } |