From 580caf6f5c9b795f9c38b9c970efce12d006ce1d Mon Sep 17 00:00:00 2001 From: Matthias Baumgartner Date: Fri, 17 Feb 2023 08:25:44 +0100 Subject: 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 --- tagit/dialogues/dialogue.kv | 63 ++++++++++----------------------------------- tagit/dialogues/dialogue.py | 6 ++--- 2 files changed, 16 insertions(+), 53 deletions(-) (limited to 'tagit/dialogues') 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 : - 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 - : # nothing to do + +: + : 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 -: + +: + +: orientation: 'vertical' size_hint_y: None height: dp(48+8) @@ -88,25 +51,25 @@ # here come the buttons -: +: ok_text: 'OK' - Button: + DialogueButton: text: root.ok_text on_press: get_root(self).ok() -: +: 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 ## -- cgit v1.2.3