diff options
author | Matthias Baumgartner <dev@igsor.net> | 2023-02-17 08:25:44 +0100 |
---|---|---|
committer | Matthias Baumgartner <dev@igsor.net> | 2023-02-17 08:25:44 +0100 |
commit | 580caf6f5c9b795f9c38b9c970efce12d006ce1d (patch) | |
tree | 24afb74d772ae44326b3e4d542598ef96ef1900f /tagit/tiles | |
parent | bf98c062ece242a5fc56de0f1adbc12f0588809a (diff) | |
download | tagit-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/tiles')
-rw-r--r-- | tagit/tiles/decoration.kv | 29 | ||||
-rw-r--r-- | tagit/tiles/decoration.py | 9 |
2 files changed, 38 insertions, 0 deletions
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 +<TileDecorationRoundedBorder>: + 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 ## |