[Commits] [SCM] clawsker branch, master, updated. 1.3.5-3-gd9bbeee

mones at claws-mail.org mones at claws-mail.org
Tue Feb 22 23:41:05 UTC 2022


The branch, master has been updated
       via  d9bbeeeae01ce28cf9cc91636f9630c1486532e7 (commit)
      from  062e545467a52376681d1ff044527ef3e0abcce0 (commit)

Summary of changes:
 clawsker | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)


- Log -----------------------------------------------------------------
commit d9bbeeeae01ce28cf9cc91636f9630c1486532e7
Author: Ricardo Mones <ricardo at mones.org>
Date:   Wed Feb 23 00:40:46 2022 +0100

    Fix bug 4571: impossible to set white colour

diff --git a/clawsker b/clawsker
index 0103b35..8ff079d 100755
--- a/clawsker
+++ b/clawsker
@@ -361,9 +361,9 @@ sub gdk_rgba_from_str {
     my ($rr, $gg, $bb) = (0, 0 ,0);
     $_ = uc ($str);
     if (/\#([A-F0-9][A-F0-9])([A-F0-9][A-F0-9])([A-F0-9][A-F0-9])/) {
-        $rr = hex($1) / 256;
-        $gg = hex($2) / 256;
-        $bb = hex($3) / 256;
+        $rr = hex($1) / 255;
+        $gg = hex($2) / 255;
+        $bb = hex($3) / 255;
     }
     my $color = Gtk3::Gdk::RGBA->new ($rr, $gg, $bb, 1.0);
     return $color;
@@ -371,9 +371,9 @@ sub gdk_rgba_from_str {
 
 sub str_from_gdk_rgba {
     my ($color) = @_;
-    my $rr = $color->red * 256;
-    my $gg = $color->green * 256;
-    my $bb = $color->blue * 256;
+    my $rr = $color->red * 255;
+    my $gg = $color->green * 255;
+    my $bb = $color->blue * 255;
     my $str = sprintf ("#%.2x%.2x%.2x", $rr, $gg, $bb);
     return $str;
 }

-----------------------------------------------------------------------


hooks/post-receive
-- 
Hidden preferences editor for Claws Mail


More information about the Commits mailing list