[gnome-tetravex/arnaudb/new-theme-2] Improve tile borders drawing.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tetravex/arnaudb/new-theme-2] Improve tile borders drawing.
- Date: Wed, 9 Oct 2019 20:57:44 +0000 (UTC)
commit 94da813c43c5f97878082d1fe705f4c0d9baafa1
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Wed Oct 9 22:57:32 2019 +0200
Improve tile borders drawing.
src/theme-adwaita.vala | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/theme-adwaita.vala b/src/theme-adwaita.vala
index 81a794a..7ecfb11 100644
--- a/src/theme-adwaita.vala
+++ b/src/theme-adwaita.vala
@@ -126,6 +126,7 @@ private class AdwaitaTheme : Theme
private double lateral_shadow_width;
private double west_shadow_limit;
+ private double north_shadow_limit;
/* numbers */
private double font_size;
@@ -160,8 +161,9 @@ private class AdwaitaTheme : Theme
overdraw_top = (int) (1.5 * tile_margin);
extrusion = -overdraw_top;
- lateral_shadow_width = tile_margin + tile_size * Math.SQRT2 / /* 2 * radius_percent / (2 * 100)
*/50.0;
+ lateral_shadow_width = tile_margin + tile_size * (Math.SQRT2 / /* 2) * radius_percent / (2 * 100);
*/ 50.0);
west_shadow_limit = new_size - lateral_shadow_width;
+ north_shadow_limit = tile_margin + tile_size * (Math.SQRT2 / /* 2) * radius_percent / 100 */ 25.0) +
extrusion;
/* numbers */
font_size = new_size * 4.0 / 19.0;
@@ -246,12 +248,15 @@ private class AdwaitaTheme : Theme
{
context.save ();
- /* Only write in a rounded square */
+ /* Only write in the bottom of a rounded square */
rounded_square (context,
/* x and y */ tile_margin, tile_margin,
/* size */ tile_size,
/* radius */ radius_percent);
- context.clip_preserve ();
+ context.clip ();
+
+ context.rectangle (/* x and y */ 0.0, north_shadow_limit, /* width and height */ size, size);
+ context.clip ();
/* South */
context.save ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]