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/tiles/decoration.kv | 29 +++++++++++++++++++++++++++++ tagit/tiles/decoration.py | 9 +++++++++ 2 files changed, 38 insertions(+) (limited to 'tagit/tiles') diff --git a/tagit/tiles/decoration.kv b/tagit/tiles/decoration.kv index a53d013..d4b37a2 100644 --- a/tagit/tiles/decoration.kv +++ b/tagit/tiles/decoration.kv @@ -55,4 +55,33 @@ size: self.size +: + cbox: cbox + + Label: + text: root.client.title + size: root.width, 20 + size_hint: None, None + pos: 0, root.height - self.height - 5 + + RelativeLayout: + id: cbox + pos: 5, 5 + size: root.width-10, root.height-30 + size_hint: None, None + + canvas.before: + Color: + rgb: 0xc5/256, 0xc9/256, 0xc7/256 + RoundedRectangle: + pos: self.pos + #radius: [10, 10, 10, 10] + size: self.size + Color: + rgb: 0x1c/256, 0x1b/256, 0x22/256 # FIXME: re-use from MainWindow? + RoundedRectangle: + pos: self.pos[0] + 2, self.pos[1] + 2 + radius: [5, 5, 5, 5] + size: self.size[0] - 4, self.size[1] - 4 + ## EOF ## diff --git a/tagit/tiles/decoration.py b/tagit/tiles/decoration.py index 471058d..c772f64 100644 --- a/tagit/tiles/decoration.py +++ b/tagit/tiles/decoration.py @@ -16,6 +16,7 @@ import kivy.properties as kp # exports __all__: typing.Sequence[str] = ( 'TileDecorationBorder', + 'TileDecorationRoundedBorder', 'TileDecorationFilledRectangle', 'TileDecorationVanilla', ) @@ -65,4 +66,12 @@ class TileDecorationBorder(TileDecoration): height = None if height is None else height + 30 return width, height +class TileDecorationRoundedBorder(TileDecoration): + @property + def default_size(self): + width, height = self.client.default_size + width = None if width is None else width + 30 + height = None if height is None else height + 30 + return width, height + ## EOF ## -- cgit v1.2.3