From 9c9d21c898c452a737561684520ffbad802de9e2 Mon Sep 17 00:00:00 2001
From: Nokse22 <44558032+Nokse22@users.noreply.github.com>
Date: Mon, 1 Jul 2024 23:47:57 +0200
Subject: [PATCH] improved design, improved select tool
---
data/style-dark.css | 4 +--
data/style.css | 19 +++++++++++-
data/ui/canvas.ui | 4 ++-
data/ui/window.ui | 4 +--
src/canvas.py | 10 +++----
src/tools/line.py | 5 ----
src/tools/select.py | 71 ++++++++++++++++-----------------------------
src/tools/tool.py | 5 ++++
8 files changed, 60 insertions(+), 62 deletions(-)
diff --git a/data/style-dark.css b/data/style-dark.css
index 20f23c6..07c94cd 100644
--- a/data/style-dark.css
+++ b/data/style-dark.css
@@ -6,8 +6,8 @@
background: transparent;
background-size: 12px 24px;
background-image:
- linear-gradient(to right, #333333 1px, transparent 1px),
- linear-gradient(to bottom, #333333 1px, transparent 1px);
+ linear-gradient(to right, #444444 1px, transparent 1px),
+ linear-gradient(to bottom, #444444 1px, transparent 1px);
box-shadow:
inset 0px 0px 0px 1px #555555,
0px 0px 6px 6px @headerbar_shade_color;
diff --git a/data/style.css b/data/style.css
index e6cf3a0..2ca69d3 100644
--- a/data/style.css
+++ b/data/style.css
@@ -37,5 +37,22 @@
.switcher button {
margin-left:3px;
margin-right:3px;
- transition: background-color 0ms linear;
+ transition: background-color 200ms linear;
+ background-color: transparent;
+}
+
+.switcher button:hover {
+ background-color: alpha(@window_fg_color, 0.05);
+}
+
+.switcher button:checked {
+ background-color: alpha(@window_fg_color, 0.08);
+}
+
+.switcher button:checked:hover {
+ background-color: alpha(@window_fg_color, 0.1);
+}
+
+.selection {
+ border: 2px dashed #0099ff;
}
diff --git a/data/ui/canvas.ui b/data/ui/canvas.ui
index 42926a3..4f0ca16 100644
--- a/data/ui/canvas.ui
+++ b/data/ui/canvas.ui
@@ -31,7 +31,9 @@ canvas-shadow
-
+
diff --git a/data/ui/window.ui b/data/ui/window.ui
index aeab8dd..919f03f 100644
--- a/data/ui/window.ui
+++ b/data/ui/window.ui
@@ -46,12 +46,12 @@