[gnome-tetravex] Improve a bit Nostalgia.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tetravex] Improve a bit Nostalgia.
- Date: Fri, 11 Oct 2019 03:20:09 +0000 (UTC)
commit d1897b8a4059531821b2bc414ab7d288dde12455
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Fri Oct 11 05:19:49 2019 +0200
Improve a bit Nostalgia.
The highlight color for the
arrow or the sockets was, I
think, designed for another
background color; and so it
was hard to see. Darken it.
src/theme-nostalgia.vala | 48 ++++++++++++++++++++++++++++++------------------
1 file changed, 30 insertions(+), 18 deletions(-)
---
diff --git a/src/theme-nostalgia.vala b/src/theme-nostalgia.vala
index 83d49cc..86bcbf0 100644
--- a/src/theme-nostalgia.vala
+++ b/src/theme-nostalgia.vala
@@ -183,9 +183,9 @@ private class NostalgiaTheme : Theme
context.line_to (arrow_w, neg_arrow_half_h);
context.close_path ();
if (animation_level == 0)
- context.set_source_rgba (0, 0, 0, 0.125);
+ context.set_source_rgba (0.0, 0.0, 0.0, 0.125);
else
- context.set_source_rgba (0, 0, 0, 0.125 * (16.0 - (double) animation_level) / 16.0);
+ context.set_source_rgba (0.0, 0.0, 0.0, 0.125 * (16.0 - (double) animation_level) / 16.0);
context.fill ();
/* Arrow highlight */
@@ -194,7 +194,10 @@ private class NostalgiaTheme : Theme
context.line_to (arrow_w_minus_depth, arrow_dy);
context.line_to (arrow_w_minus_depth, neg_arrow_dy);
context.close_path ();
- context.set_source_rgba (1.0, 1.0, 1.0, 0.125);
+ if (animation_level == 0)
+ context.set_source_rgba (0.6, 0.6, 0.5, 0.125);
+ else
+ context.set_source_rgba (0.6, 0.6, 0.5, 0.125 * (16.0 - (double) animation_level) / 16.0);
context.fill ();
/* Arrow shadow */
@@ -205,7 +208,10 @@ private class NostalgiaTheme : Theme
context.line_to (arrow_dx, 0.0);
context.line_to (arrow_w_minus_depth, neg_arrow_dy);
context.close_path ();
- context.set_source_rgba (0.0, 0.0, 0.0, 0.25);
+ if (animation_level == 0)
+ context.set_source_rgba (0.0, 0.0, 0.0, 0.25);
+ else
+ context.set_source_rgba (0.0, 0.0, 0.0, 0.25 * (16.0 - (double) animation_level) / 16.0);
context.fill ();
}
@@ -218,20 +224,9 @@ private class NostalgiaTheme : Theme
/* Background */
context.rectangle (socket_depth, socket_depth, size_minus_two_socket_depths,
size_minus_two_socket_depths);
if (animation_level == 0)
- context.set_source_rgba (0, 0, 0, 0.125);
+ context.set_source_rgba (0.0, 0.0, 0.0, 0.125);
else
- context.set_source_rgba (0, 0, 0, 0.125 * (16.0 - (double) animation_level) / 16.0);
- context.fill ();
-
- /* Shadow */
- context.move_to (size, 0.0);
- context.line_to (0.0, 0.0);
- context.line_to (0.0, size);
- context.line_to (socket_depth, size_minus_socket_depth);
- context.line_to (socket_depth, socket_depth);
- context.line_to (size_minus_socket_depth, socket_depth);
- context.close_path ();
- context.set_source_rgba (0.0, 0.0, 0.0, 0.25);
+ context.set_source_rgba (0.0, 0.0, 0.0, 0.125 * (16.0 - (double) animation_level) / 16.0);
context.fill ();
/* Highlight */
@@ -242,7 +237,24 @@ private class NostalgiaTheme : Theme
context.line_to (size_minus_socket_depth, size_minus_socket_depth);
context.line_to (socket_depth, size_minus_socket_depth);
context.close_path ();
- context.set_source_rgba (1.0, 1.0, 1.0, 0.125);
+ if (animation_level == 0)
+ context.set_source_rgba (0.6, 0.6, 0.5, 0.125);
+ else
+ context.set_source_rgba (0.6, 0.6, 0.5, 0.125 * (16.0 - (double) animation_level) / 16.0);
+ context.fill ();
+
+ /* Shadow */
+ context.move_to (size, 0.0);
+ context.line_to (0.0, 0.0);
+ context.line_to (0.0, size);
+ context.line_to (socket_depth, size_minus_socket_depth);
+ context.line_to (socket_depth, socket_depth);
+ context.line_to (size_minus_socket_depth, socket_depth);
+ context.close_path ();
+ if (animation_level == 0)
+ context.set_source_rgba (0.0, 0.0, 0.0, 0.25);
+ else
+ context.set_source_rgba (0.0, 0.0, 0.0, 0.25 * (16.0 - (double) animation_level) / 16.0);
context.fill ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]