diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-08-28 14:08:56 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-08-28 14:08:56 +0200 |
commit | e4e7bde556930467243a541f2e3359c9535d7c1c (patch) | |
tree | c7f232d9a829f55e66152a55a339eb1d079f0b6d | |
parent | 50d337807cf6255ebdb55d418b48ba6eddec5c61 (diff) | |
parent | 58936322e83aab6653588398498f4f696581c98e (diff) | |
download | arctica-greeter-e4e7bde556930467243a541f2e3359c9535d7c1c.tar.gz arctica-greeter-e4e7bde556930467243a541f2e3359c9535d7c1c.tar.bz2 arctica-greeter-e4e7bde556930467243a541f2e3359c9535d7c1c.zip |
Merge branch 'Ionic-feature/configurable-logo-alpha'
Attributes GH PR #53: https://github.com/ArcticaProject/arctica-greeter/pull/53
-rw-r--r-- | data/org.ArcticaProject.arctica-greeter.gschema.xml | 4 | ||||
-rw-r--r-- | src/background.vala | 2 | ||||
-rw-r--r-- | src/settings.vala | 1 |
3 files changed, 6 insertions, 1 deletions
diff --git a/data/org.ArcticaProject.arctica-greeter.gschema.xml b/data/org.ArcticaProject.arctica-greeter.gschema.xml index 5496fe9..28002cc 100644 --- a/data/org.ArcticaProject.arctica-greeter.gschema.xml +++ b/data/org.ArcticaProject.arctica-greeter.gschema.xml @@ -77,6 +77,10 @@ <default>'/usr/share/arctica-greeter/logo.png'</default> <summary>Logo file to use</summary> </key> + <key name="logo-alpha" type="d"> + <default>0.5</default> + <summary>Alpha value for blending the logo onto the background</summary> + </key> <key name="theme-name" type="s"> <default>'Numix'</default> <summary>GTK+ theme to use</summary> diff --git a/src/background.vala b/src/background.vala index c523eb5..70813ea 100644 --- a/src/background.vala +++ b/src/background.vala @@ -208,7 +208,7 @@ class BackgroundLoader : Object var y = (int) (image.height / grid_size - 2) * grid_size + grid_y_offset; bc.translate (x, y); bc.set_source_surface (logo, 0, 0); - bc.paint_with_alpha (0.5); + bc.paint_with_alpha (AGSettings.get_double (AGSettings.KEY_LOGO_ALPHA)); bc.restore (); } diff --git a/src/settings.vala b/src/settings.vala index 30f25ed..7e49894 100644 --- a/src/settings.vala +++ b/src/settings.vala @@ -33,6 +33,7 @@ public class AGSettings : Object public const string KEY_DRAW_GRID = "draw-grid"; public const string KEY_SHOW_HOSTNAME = "show-hostname"; public const string KEY_LOGO = "logo"; + public const string KEY_LOGO_ALPHA = "logo-alpha"; public const string KEY_THEME_NAME = "theme-name"; public const string KEY_HIGH_CONTRAST_THEME_NAME = "high-contrast-theme-name"; public const string KEY_ICON_THEME_NAME = "icon-theme-name"; |