aboutsummaryrefslogtreecommitdiffstats
path: root/tagit/dialogues
diff options
context:
space:
mode:
authorMatthias Baumgartner <dev@igsor.net>2023-02-17 08:25:44 +0100
committerMatthias Baumgartner <dev@igsor.net>2023-02-17 08:25:44 +0100
commit580caf6f5c9b795f9c38b9c970efce12d006ce1d (patch)
tree24afb74d772ae44326b3e4d542598ef96ef1900f /tagit/dialogues
parentbf98c062ece242a5fc56de0f1adbc12f0588809a (diff)
downloadtagit-580caf6f5c9b795f9c38b9c970efce12d006ce1d.tar.gz
tagit-580caf6f5c9b795f9c38b9c970efce12d006ce1d.tar.bz2
tagit-580caf6f5c9b795f9c38b9c970efce12d006ce1d.zip
New UI design
* Moved style definitions to its own file (themes/default) * Updated the desktop.kv to the new UI design * Removed planes * Adjusted port config
Diffstat (limited to 'tagit/dialogues')
-rw-r--r--tagit/dialogues/dialogue.kv63
-rw-r--r--tagit/dialogues/dialogue.py6
2 files changed, 16 insertions, 53 deletions
diff --git a/tagit/dialogues/dialogue.kv b/tagit/dialogues/dialogue.kv
index e23f0db..e2cab66 100644
--- a/tagit/dialogues/dialogue.kv
+++ b/tagit/dialogues/dialogue.kv
@@ -6,68 +6,28 @@
ok_on_enter: True
<DialogueContentBase>:
-
orientation: 'vertical'
padding: '12dp'
size_hint: 0.66, None
height: self.minimum_height
- canvas:
- # mask main window
- Color:
- rgba: 0,0,0, 0.7 * self.parent._anim_alpha
- Rectangle:
- size: self.parent._window.size if self.parent._window else (0, 0)
-
- # solid background color
- Color:
- rgb: 1, 1, 1
- BorderImage:
- source: self.parent.background
- border: self.parent.border
- pos: self.pos
- size: self.size
-
<DialogueContentNoTitle@DialogueContentBase>:
# nothing to do
+
+<DialogueTitle@Label>:
+
<DialogueContentTitle@DialogueContentBase>:
title: ''
title_color: 1,1,1,1
- Label:
+ DialogueTitle:
text: root.title
size_hint_y: None
height: self.texture_size[1] + dp(16)
text_size: self.width - dp(16), None
- font_size: '16sp'
color: root.title_color
- bold: True
- halign: 'center'
- valing: 'middle'
-
- canvas.before:
- # Background
- Color:
- rgb: 0.2, 0.2, 0.2
- Rectangle:
- size: self.size
- pos: self.pos
-
- # top border
- #Color:
- # rgb: 0.5, 0.5, 0.5
- #Line:
- # points: self.x, self.y + self.height, self.x + self.width, self.y + self.height
- # width: 2
-
- # bottom border
- #Color:
- # rgb: 0.5, 0.5, 0.5
- #Line:
- # points: self.x, self.y, self.x + self.width, self.y
- # width: 2
# small space
Label:
@@ -75,7 +35,10 @@
height: 12
-<DialogueButtons>:
+
+<DialogueButton@Button>:
+
+<DialogueButtonRow>:
orientation: 'vertical'
size_hint_y: None
height: dp(48+8)
@@ -88,25 +51,25 @@
# here come the buttons
-<DialogueButtons_One@DialogueButtons>:
+<DialogueButtons_One@DialogueButtonRow>:
ok_text: 'OK'
- Button:
+ DialogueButton:
text: root.ok_text
on_press: get_root(self).ok()
-<DialogueButtons_Two@DialogueButtons>:
+<DialogueButtons_Two@DialogueButtonRow>:
cancel_text: 'Cancel'
ok_text: 'OK'
ok_enabled: True
BoxLayout:
orientation: 'horizontal'
- Button:
+ DialogueButton:
text: root.cancel_text
on_press: get_root(self).cancel()
- Button:
+ DialogueButton:
text: root.ok_text
on_press: get_root(self).ok()
disabled: not root.ok_enabled
diff --git a/tagit/dialogues/dialogue.py b/tagit/dialogues/dialogue.py
index 1aa0e9a..bf72a28 100644
--- a/tagit/dialogues/dialogue.py
+++ b/tagit/dialogues/dialogue.py
@@ -101,8 +101,8 @@ class DialogueContentTitle(DialogueContentBase): pass
class DialogueContentNoTitle(DialogueContentBase): pass
# buttons
-class DialogueButtons(BoxLayout): pass
-class DialogueButtons_One(DialogueButtons): pass
-class DialogueButtons_Two(DialogueButtons): pass
+class DialogueButtonRow(BoxLayout): pass
+class DialogueButtons_One(DialogueButtonRow): pass
+class DialogueButtons_Two(DialogueButtonRow): pass
## EOF ##