[gnome-todo] theme: Split theme in separate files



commit 4269c10d25ba46190e2e2c1e5e624a6876b720c6
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat May 2 09:43:14 2020 -0300

    theme: Split theme in separate files

 src/theme/Adwaita-omniarea.css     |  13 +++++
 src/theme/Adwaita-tasklistview.css |  45 +++++++++++++++
 src/theme/Adwaita-taskrow.css      |  43 ++++++++++++++
 src/theme/Adwaita.css              | 114 ++-----------------------------------
 src/todo.gresource.xml             |   3 +
 5 files changed, 108 insertions(+), 110 deletions(-)
---
diff --git a/src/theme/Adwaita-omniarea.css b/src/theme/Adwaita-omniarea.css
new file mode 100644
index 0000000..1b575d1
--- /dev/null
+++ b/src/theme/Adwaita-omniarea.css
@@ -0,0 +1,13 @@
+omniarea entry {
+  background-color: mix(@theme_bg_color, @content_view_bg, 0.25);
+  color: @theme_fg_color;
+}
+omniarea:hover entry,
+omniarea:active entry {
+  background-color: @content_view_bg;
+  color: @theme_fg_color;
+}
+
+omniarea:backdrop entry {
+  background-color: @theme_bg_color;
+}
diff --git a/src/theme/Adwaita-tasklistview.css b/src/theme/Adwaita-tasklistview.css
new file mode 100644
index 0000000..058033a
--- /dev/null
+++ b/src/theme/Adwaita-tasklistview.css
@@ -0,0 +1,45 @@
+tasklistview row {
+  border-radius: 5px;
+}
+
+tasklistview.dark stack spinner,
+tasklistview.dark emptylistwidget label,
+tasklistview.dark emptylistwidget image {
+    color: white;
+}
+
+tasklistview.light stack spinner,
+tasklistview.light emptylistwidget label,
+tasklistview.light emptylistwidget image {
+    color: black;
+}
+
+tasklistview list:drop(active) {
+    box-shadow: none;
+    border: none;
+}
+
+/* Add a subtle shadow to color circles */
+image.color-circle-icon {
+    -gtk-icon-shadow: 0 1px alpha(black, 0.18);
+}
+
+/* Color button */
+colorbutton {
+    border-radius: 6px;
+    transition: 100ms;
+}
+
+colorbutton:hover {
+    filter: brightness(80%);
+    transition: 100ms;
+}
+
+colorbutton.dark image {
+    color: white;
+}
+
+colorbutton.light image {
+    color: black;
+}
+
diff --git a/src/theme/Adwaita-taskrow.css b/src/theme/Adwaita-taskrow.css
new file mode 100644
index 0000000..7d90494
--- /dev/null
+++ b/src/theme/Adwaita-taskrow.css
@@ -0,0 +1,43 @@
+taskrow:dir(ltr) { padding-left: 6px;  }
+taskrow:dir(rtl) { padding-right: 6px; }
+
+taskrow.active {
+  background-color: @theme_bg_color;
+  border: solid 1px @borders;
+}
+
+/* task title entry */
+taskrow text {
+  border: solid 1px transparent;
+  background: none;
+  border-radius: 3px;
+}
+
+taskrow text:hover:not(:focus) {
+  border: solid 1px @borders;
+}
+
+/* line-through complete tasks */
+taskrow.complete > * { opacity: 0.5; }
+taskrow.complete entry.title { text-decoration-line: line-through; }
+
+/* dnd row */
+taskrow box.dnd {
+    background: alpha(@theme_fg_color, 0.1);
+}
+
+tasklistview { background-color: @theme_base_color; }
+
+/* new task row */
+newtaskrow entry { padding: 0 16px 0 14px; }
+
+/* extension list */
+list.extension-list row {
+    border-bottom: solid 1px @borders;
+}
+
+/* circle button */
+button.circle {
+    border-radius: 20px;
+}
+
diff --git a/src/theme/Adwaita.css b/src/theme/Adwaita.css
index 2f98c07..9fe611d 100644
--- a/src/theme/Adwaita.css
+++ b/src/theme/Adwaita.css
@@ -1,3 +1,7 @@
+@import url("resource:///org/gnome/todo/theme/Adwaita-omniarea.css");
+@import url("resource:///org/gnome/todo/theme/Adwaita-tasklistview.css");
+@import url("resource:///org/gnome/todo/theme/Adwaita-taskrow.css");
+
 .transparent {
     background-color: transparent;
 }
@@ -52,113 +56,3 @@ arrow-frame:dir(rtl) {
 label.main-title {
     font-size: 28px;
 }
-
-
-/*
- * GtdTaskRow
- */
-
-taskrow { border-radius: 3px;}
-
-taskrow:dir(ltr) { padding-left: 6px;  }
-taskrow:dir(rtl) { padding-right: 6px; }
-
-taskrow.active {
-  background-color: @theme_bg_color;
-  border: solid 1px @borders;
-}
-
-/* task title entry */
-taskrow text {
-  border: solid 1px transparent;
-  background: none;
-  border-radius: 3px;
-}
-
-taskrow text:hover:not(:focus) {
-  border: solid 1px @borders;
-}
-
-/* line-through complete tasks */
-taskrow.complete > * { opacity: 0.5; }
-taskrow.complete entry.title { text-decoration-line: line-through; }
-
-/* dnd row */
-taskrow box.dnd {
-    background: alpha(@theme_fg_color, 0.1);
-}
-
-tasklistview { background-color: @theme_base_color; }
-
-/* new task row */
-newtaskrow entry { padding: 0 16px 0 14px; }
-
-/* extension list */
-list.extension-list row {
-    border-bottom: solid 1px @borders;
-}
-
-/* circle button */
-button.circle {
-    border-radius: 20px;
-}
-
-/*
- * Tasklist view
- */
-tasklistview.dark stack spinner,
-tasklistview.dark emptylistwidget label,
-tasklistview.dark emptylistwidget image {
-    color: white;
-}
-
-tasklistview.light stack spinner,
-tasklistview.light emptylistwidget label,
-tasklistview.light emptylistwidget image {
-    color: black;
-}
-
-tasklistview list:drop(active) {
-    box-shadow: none;
-    border: none;
-}
-
-/* Add a subtle shadow to color circles */
-image.color-circle-icon {
-    -gtk-icon-shadow: 0 1px alpha(black, 0.18);
-}
-
-/* Color button */
-colorbutton {
-    border-radius: 6px;
-    transition: 100ms;
-}
-
-colorbutton:hover {
-    filter: brightness(80%);
-    transition: 100ms;
-}
-
-colorbutton.dark image {
-    color: white;
-}
-
-colorbutton.light image {
-    color: black;
-}
-
-/* Omni Area */
-
-omniarea entry {
-  background-color: mix(@theme_bg_color, @content_view_bg, 0.25);
-  color: @theme_fg_color;
-}
-omniarea:hover entry,
-omniarea:active entry {
-  background-color: @content_view_bg;
-  color: @theme_fg_color;
-}
-
-omniarea:backdrop entry {
-  background-color: @theme_bg_color;
-}
diff --git a/src/todo.gresource.xml b/src/todo.gresource.xml
index 07f4381..0d46b9f 100644
--- a/src/todo.gresource.xml
+++ b/src/todo.gresource.xml
@@ -21,5 +21,8 @@
 
   <gresource prefix="/org/gnome/todo">
     <file compressed="true">theme/Adwaita.css</file>
+    <file compressed="true">theme/Adwaita-omniarea.css</file>
+    <file compressed="true">theme/Adwaita-tasklistview.css</file>
+    <file compressed="true">theme/Adwaita-taskrow.css</file>
   </gresource>
 </gresources>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]