aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--tagit/__init__.py1
-rw-r--r--tagit/actions/__init__.py5
-rw-r--r--tagit/actions/action.kv15
-rw-r--r--tagit/actions/planes.kv15
-rw-r--r--tagit/actions/planes.py57
-rw-r--r--tagit/apps/port-config.yaml79
-rw-r--r--tagit/assets/icons/scalable/planes/browsing.svg157
-rw-r--r--tagit/assets/icons/scalable/planes/codash.svg147
-rw-r--r--tagit/assets/icons/scalable/planes/dashboard.svg142
-rw-r--r--tagit/assets/themes/default/style.kv206
-rw-r--r--tagit/dialogues/dialogue.kv63
-rw-r--r--tagit/dialogues/dialogue.py6
-rw-r--r--tagit/tiles/decoration.kv29
-rw-r--r--tagit/tiles/decoration.py9
-rw-r--r--tagit/widgets/browser.kv23
-rw-r--r--tagit/widgets/browser.py7
-rw-r--r--tagit/widgets/filter.kv59
-rw-r--r--tagit/widgets/status.kv16
-rw-r--r--tagit/windows/desktop.kv145
-rw-r--r--tagit/windows/desktop.py35
21 files changed, 411 insertions, 806 deletions
diff --git a/.gitignore b/.gitignore
index ba73cdf..4a3d2b0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,7 +36,6 @@ tagit/assets/icons/kivy/browser*
tagit/assets/icons/kivy/filter*
tagit/assets/icons/kivy/grouping*
tagit/assets/icons/kivy/misc*
-tagit/assets/icons/kivy/planes*
tagit/assets/icons/kivy/search*
tagit/assets/icons/kivy/session*
tagit/assets/icons/kivy/tagging*
diff --git a/tagit/__init__.py b/tagit/__init__.py
index ec5f1c2..0e10d7b 100644
--- a/tagit/__init__.py
+++ b/tagit/__init__.py
@@ -40,6 +40,7 @@ kivy.require('1.9.1')
# add resources
resource_add_path(os.path.join(os.path.dirname(__file__), 'assets', 'icons', 'kivy'))
resource_add_path(os.path.join(os.path.dirname(__file__), 'assets', 'fonts', 'kivy'))
+resource_add_path(os.path.join(os.path.dirname(__file__), 'assets', 'themes'))
# load font
from kivy.core.text import LabelBase
diff --git a/tagit/actions/__init__.py b/tagit/actions/__init__.py
index b2ab6bd..bcd71c0 100644
--- a/tagit/actions/__init__.py
+++ b/tagit/actions/__init__.py
@@ -16,7 +16,6 @@ from . import filter
from . import grouping
from . import misc
#from . import objects
-from . import planes
from . import search
from . import session
from . import tagging
@@ -93,10 +92,6 @@ class ActionBuilder(BuilderBase):
#'SetRank3': objects.SetRank3,
#'SetRank4': objects.SetRank4,
#'SetRank5': objects.SetRank5,
- ## planes
- 'ShowDashboard': planes.ShowDashboard,
- 'ShowBrowsing': planes.ShowBrowsing,
- 'ShowCodash': planes.ShowCodash,
## search
'Search': search.Search,
'ShowSelected': search.ShowSelected,
diff --git a/tagit/actions/action.kv b/tagit/actions/action.kv
index 5352964..807dd18 100644
--- a/tagit/actions/action.kv
+++ b/tagit/actions/action.kv
@@ -27,19 +27,4 @@
# to be disabled **after** show.
show: []
- # decoration
- canvas.before:
- Color:
- rgba: 17 / 255, 32 / 255, 148 / 255, self.selected_alpha
- Rectangle:
- pos: self.x, self.y + 1
- size: self.size
-
- canvas.after:
- Color:
- rgba: 17 / 255, 32 / 255, 148 / 255, self.selected_alpha
- Line:
- width: 2
- rectangle: self.x, self.y, self.width, self.height
-
## EOF ##
diff --git a/tagit/actions/planes.kv b/tagit/actions/planes.kv
deleted file mode 100644
index 184f949..0000000
--- a/tagit/actions/planes.kv
+++ /dev/null
@@ -1,15 +0,0 @@
-#:import resource_find kivy.resources.resource_find
-
-<ShowDashboard>:
- source: resource_find('atlas://planes/dashboard')
- tooltip: 'Switch to the Dashboard'
-
-<ShowBrowsing>:
- source: resource_find('atlas://planes/browsing')
- tooltip: 'Switch to the browsing plane'
-
-<ShowCodash>:
- source: resource_find('atlas://planes/codash')
- tooltip: 'Switch to the contextual dashboard'
-
-## EOF ##
diff --git a/tagit/actions/planes.py b/tagit/actions/planes.py
deleted file mode 100644
index 89f93bb..0000000
--- a/tagit/actions/planes.py
+++ /dev/null
@@ -1,57 +0,0 @@
-"""
-
-Part of the tagit module.
-A copy of the license is provided with the project.
-Author: Matthias Baumgartner, 2022
-"""
-# standard imports
-import os
-
-# kivy imports
-from kivy.lang import Builder
-import kivy.properties as kp
-
-# inner-module imports
-from .action import Action
-
-# exports
-__all__ = []
-
-
-## code ##
-
-# load kv
-Builder.load_file(os.path.join(os.path.dirname(__file__), 'planes.kv'))
-
-# classes
-
-class ShowDashboard(Action):
- """Switch to the dashboard."""
- text = kp.StringProperty('Dashboard')
-
- def apply(self):
- planes = self.root.planes
- if planes.current_slide != planes.dashboard:
- planes.load_slide(planes.dashboard)
-
-
-class ShowBrowsing(Action):
- """Switch to the browsing plane."""
- text = kp.StringProperty('Browsing')
-
- def apply(self):
- planes = self.root.planes
- if planes.current_slide != planes.browsing:
- planes.load_slide(planes.browsing)
-
-
-class ShowCodash(Action):
- """Switch to the contextual dashboard."""
- text = kp.StringProperty('Context')
-
- def apply(self):
- planes = self.root.planes
- if planes.current_slide != planes.codash:
- planes.load_slide(planes.codash)
-
-## EOF ##
diff --git a/tagit/apps/port-config.yaml b/tagit/apps/port-config.yaml
index a9907b7..323d616 100644
--- a/tagit/apps/port-config.yaml
+++ b/tagit/apps/port-config.yaml
@@ -7,9 +7,9 @@ session:
backend:
SparqlStore: {}
user: 'http://example.com/me'
- script:
+ script: []
#- ShowBrowsing
- - [AddToken, 'hello']
+ #- [AddToken, 'hello']
storage:
index:
preview_size:
@@ -18,8 +18,11 @@ storage:
- 400
ui:
standalone:
- plane: browsing
+ window_size: [1024, 768]
+ maximize: True
keytriggers:
+ #- ClipboardCopy
+ #- ClipboardPaste
- CreateGroup
- DissolveGroup
- AddToGroup
@@ -55,17 +58,37 @@ ui:
- OpenExternal
- ShowHelp
browser:
+ cols: 4
+ rows: 3
maxcols: 8
maxrows: 8
+ #gridmode: 'list'
buttondocks:
+ navigation_left:
+ - MoveCursorFirst
+ - PreviousPage
+ - ScrollUp
+ navigation_right:
+ - NextPage
+ - ScrollDown
+ - MoveCursorLast
+ filter:
+ - GoBack
+ - GoForth
+ status:
+ - ZoomIn
+ - ZoomOut
+ #- RotateLeft
+ #- DeleteObject
+ #- RotateRight
sidebar_left:
- Menu
- - ShowDashboard
- - AddToken
- AddTag
- EditTag
- - CreateGroup
- - DissolveGroup
+ - ShowSelected
+ - RemoveSelected
+ #- CreateGroup
+ #- DissolveGroup
- SelectAll
- SelectNone
- SelectInvert
@@ -74,16 +97,13 @@ ui:
- SelectSingle
- SelectMulti
- SelectRange
- - ShellDrop
- filter:
- - AddToken
- - EditToken
context:
app:
- - ShowSettings
+ - LoadSession
- ShowHelp
- ShowConsole
- - ShowBrowsing
+ - ShellDrop
+ - ShowSettings
browser:
- ZoomIn
- ZoomOut
@@ -96,11 +116,11 @@ ui:
- AddToGroup
# - RepresentGroup
# - RemoveFromGroup
- root:
- - LoadSession
- # search:
- # - ShowSelected
- # - RemoveSelected
+ search:
+ - ShowSelected
+ - RemoveSelected
+ - GoForth
+ - GoBack
select:
- SelectAll
- SelectNone
@@ -127,28 +147,5 @@ ui:
- camera
- attributes
tiledocks:
- dashboard: {}
- #Buttons:
- # buttons:
- # - ShowBrowsing
- # - CreateSession
- # - CreateTempSession
- # - LoadSession
- # - ReloadSession
- # - ImportObjects
- # - ItemExport
- # - UpdateSelectedObjects
- # - ShowHelp
- # - ShowSettings
- #Hints: {}
- #LibSummary: {}
- #Searchtree: {}
- #TagHistogram: {}
- #Tagcloud: {}
sidebar_right:
Info: {}
- CursorTags: {}
- BrowserTags: {}
- #SelectionTags: {}
- #Geo: {}
- window_size: 1024x768
diff --git a/tagit/assets/icons/scalable/planes/browsing.svg b/tagit/assets/icons/scalable/planes/browsing.svg
deleted file mode 100644
index f502c36..0000000
--- a/tagit/assets/icons/scalable/planes/browsing.svg
+++ /dev/null
@@ -1,157 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="100mm"
- height="100mm"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.3 (2405546, 2018-03-11)"
- sodipodi:docname="browsing.svg"
- inkscape:export-filename="../../kivy/misc/browsing.png"
- inkscape:export-xdpi="7.6199999"
- inkscape:export-ydpi="7.6199999">
- <defs
- id="defs4">
- <marker
- inkscape:stockid="Arrow2Mend"
- orient="auto"
- refY="0"
- refX="0"
- id="Arrow2Mend"
- style="overflow:visible"
- inkscape:isstock="true">
- <path
- id="path847"
- style="fill:#c8c8c8;fill-opacity:1;fill-rule:evenodd;stroke:#c8c8c8;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
- d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
- transform="scale(-0.6)"
- inkscape:connector-curvature="0" />
- </marker>
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1.4"
- inkscape:cx="79.928267"
- inkscape:cy="249.27915"
- inkscape:document-units="mm"
- inkscape:current-layer="layer1"
- showgrid="false"
- showguides="true"
- inkscape:guide-bbox="true"
- inkscape:snap-global="true"
- inkscape:snap-bbox="true"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-right="0"
- fit-margin-bottom="0"
- inkscape:window-width="1920"
- inkscape:window-height="1031"
- inkscape:window-x="0"
- inkscape:window-y="25"
- inkscape:window-maximized="1"
- inkscape:pagecheckerboard="true"
- units="mm"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:snap-bbox-midpoints="true"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-smooth-nodes="true"
- inkscape:snap-midpoints="true"
- inkscape:snap-object-midpoints="true"
- inkscape:snap-center="true"
- inkscape:snap-text-baseline="true"
- inkscape:snap-page="true"
- inkscape:lockguides="false">
- <sodipodi:guide
- orientation="0,1"
- position="13.637059,643.40404"
- id="guide3788"
- inkscape:locked="false" />
- <sodipodi:guide
- position="188.97638,188.97638"
- orientation="0,1"
- id="guide1099"
- inkscape:locked="false"
- inkscape:label=""
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="188.97638,188.97638"
- orientation="1,0"
- id="guide1101"
- inkscape:locked="false"
- inkscape:label=""
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="233.588,370"
- orientation="1,0"
- id="guide1107"
- inkscape:locked="false"
- inkscape:label=""
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="144.36496,311.42857"
- orientation="1,0"
- id="guide1109"
- inkscape:locked="false"
- inkscape:label=""
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="-77.142857,144.36496"
- orientation="0,1"
- id="guide1111"
- inkscape:locked="false"
- inkscape:label=""
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="5.000315,233.58779"
- orientation="0,1"
- id="guide1113"
- inkscape:locked="false"
- inkscape:label=""
- inkscape:color="rgb(0,0,255)" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(-167.28122,-322.85977)">
- <circle
- style="fill:none;fill-opacity:1;stroke:#c8c8c8;stroke-width:21.39488792;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="path4522"
- cx="356.2576"
- cy="511.83612"
- r="178.27893" />
- <path
- style="fill:#c8c8c8;stroke:#c8c8c8;stroke-width:25.67386436;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow2Mend);fill-opacity:1"
- d="M 294.33569,574.10683 413.77539,454.66718"
- id="path818"
- inkscape:connector-curvature="0" />
- </g>
-</svg>
diff --git a/tagit/assets/icons/scalable/planes/codash.svg b/tagit/assets/icons/scalable/planes/codash.svg
deleted file mode 100644
index b25c2b0..0000000
--- a/tagit/assets/icons/scalable/planes/codash.svg
+++ /dev/null
@@ -1,147 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="100mm"
- height="100mm"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.3 (2405546, 2018-03-11)"
- sodipodi:docname="codash.svg"
- inkscape:export-filename="../../kivy/misc/dashboard.png"
- inkscape:export-xdpi="7.6199999"
- inkscape:export-ydpi="7.6199999">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="0.98994949"
- inkscape:cx="63.505754"
- inkscape:cy="116.58788"
- inkscape:document-units="mm"
- inkscape:current-layer="layer1"
- showgrid="false"
- showguides="true"
- inkscape:guide-bbox="true"
- inkscape:snap-global="true"
- inkscape:snap-bbox="true"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-right="0"
- fit-margin-bottom="0"
- inkscape:window-width="1920"
- inkscape:window-height="1056"
- inkscape:window-x="0"
- inkscape:window-y="1200"
- inkscape:window-maximized="1"
- inkscape:pagecheckerboard="true"
- units="mm"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:snap-bbox-midpoints="true"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-smooth-nodes="true"
- inkscape:snap-midpoints="true"
- inkscape:snap-object-midpoints="true"
- inkscape:snap-center="true"
- inkscape:snap-text-baseline="true"
- inkscape:snap-page="true"
- inkscape:lockguides="false">
- <sodipodi:guide
- orientation="0,1"
- position="13.637059,643.40404"
- id="guide3788"
- inkscape:locked="false" />
- <sodipodi:guide
- position="188.97638,188.97638"
- orientation="0,1"
- id="guide1099"
- inkscape:locked="false"
- inkscape:label=""
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="188.97638,188.97638"
- orientation="1,0"
- id="guide1101"
- inkscape:locked="false"
- inkscape:label=""
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="233.588,370"
- orientation="1,0"
- id="guide1107"
- inkscape:locked="false"
- inkscape:label=""
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="144.36496,311.42857"
- orientation="1,0"
- id="guide1109"
- inkscape:locked="false"
- inkscape:label=""
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="-77.142857,144.36496"
- orientation="0,1"
- id="guide1111"
- inkscape:locked="false"
- inkscape:label=""
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="5.000315,233.58779"
- orientation="0,1"
- id="guide1113"
- inkscape:locked="false"
- inkscape:label=""
- inkscape:color="rgb(0,0,255)" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(-167.28122,-322.85977)">
- <circle
- style="fill:none;fill-opacity:1;stroke:#c8c8c8;stroke-width:21.39488792;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="path4522"
- cx="356.2576"
- cy="511.83615"
- r="178.27893" />
- <text
- xml:space="preserve"
- style="font-style:normal;font-weight:normal;font-size:103.40699768px;line-height:1.25;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#c8c8c8;fill-opacity:1;stroke:none;stroke-width:2.5851748"
- x="209.33694"
- y="611.10687"
- id="text823"><tspan
- sodipodi:role="line"
- id="tspan821"
- x="209.33694"
- y="611.10687"
- style="font-style:italic;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:496.35357666px;font-family:'Berenis ADF Pro';-inkscape-font-specification:'Berenis ADF Pro Bold Italic';fill:#c8c8c8;fill-opacity:1;stroke-width:2.5851748">c</tspan></text>
- </g>
-</svg>
diff --git a/tagit/assets/icons/scalable/planes/dashboard.svg b/tagit/assets/icons/scalable/planes/dashboard.svg
deleted file mode 100644
index 6f7e4a3..0000000
--- a/tagit/assets/icons/scalable/planes/dashboard.svg
+++ /dev/null
@@ -1,142 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="100mm"
- height="100mm"
- id="svg2"
- version="1.1"
- inkscape:version="0.92.3 (2405546, 2018-03-11)"
- sodipodi:docname="dashboard.svg"
- inkscape:export-filename="../../kivy/misc/dashboard.png"
- inkscape:export-xdpi="7.6199999"
- inkscape:export-ydpi="7.6199999">
- <defs
- id="defs4" />
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="0.98994949"
- inkscape:cx="218.56417"
- inkscape:cy="120.62849"
- inkscape:document-units="mm"
- inkscape:current-layer="layer1"
- showgrid="false"
- showguides="true"
- inkscape:guide-bbox="true"
- inkscape:snap-global="true"
- inkscape:snap-bbox="true"
- fit-margin-top="0"
- fit-margin-left="0"
- fit-margin-right="0"
- fit-margin-bottom="0"
- inkscape:window-width="1920"
- inkscape:window-height="1031"
- inkscape:window-x="0"
- inkscape:window-y="25"
- inkscape:window-maximized="1"
- inkscape:pagecheckerboard="true"
- units="mm"
- inkscape:bbox-paths="true"
- inkscape:bbox-nodes="true"
- inkscape:snap-bbox-edge-midpoints="true"
- inkscape:snap-bbox-midpoints="true"
- inkscape:object-paths="true"
- inkscape:snap-intersection-paths="true"
- inkscape:snap-smooth-nodes="true"
- inkscape:snap-midpoints="true"
- inkscape:snap-object-midpoints="true"
- inkscape:snap-center="true"
- inkscape:snap-text-baseline="true"
- inkscape:snap-page="true"
- inkscape:lockguides="false">
- <sodipodi:guide
- orientation="0,1"
- position="13.637059,643.40404"
- id="guide3788"
- inkscape:locked="false" />
- <sodipodi:guide
- position="188.97638,188.97638"
- orientation="0,1"
- id="guide1099"
- inkscape:locked="false"
- inkscape:label=""
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="188.97638,188.97638"
- orientation="1,0"
- id="guide1101"
- inkscape:locked="false"
- inkscape:label=""
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="233.588,370"
- orientation="1,0"
- id="guide1107"
- inkscape:locked="false"
- inkscape:label=""
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="144.36496,311.42857"
- orientation="1,0"
- id="guide1109"
- inkscape:locked="false"
- inkscape:label=""
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="-77.142857,144.36496"
- orientation="0,1"
- id="guide1111"
- inkscape:locked="false"
- inkscape:label=""
- inkscape:color="rgb(0,0,255)" />
- <sodipodi:guide
- position="5.000315,233.58779"
- orientation="0,1"
- id="guide1113"
- inkscape:locked="false"
- inkscape:label=""
- inkscape:color="rgb(0,0,255)" />
- </sodipodi:namedview>
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(-167.28122,-322.85977)">
- <path
- d="m 356.64939,617.51072 c 0,0 -8.76851,5.82936 -14.76239,5.80268 -0.53358,0.24456 -0.84928,0.38685 -0.84928,0.38685 l 0.0133,-0.38685 c -1.25835,-0.0578 -2.52562,-0.23566 -3.80175,-0.55581 l -1.89422,-0.46688 c -10.46706,-2.59676 -16.0074,-12.9749 -13.40175,-23.43752 l 14.57119,-58.74275 6.57637,-26.53229 c 6.11838,-24.63362 -19.40009,5.23798 -24.63363,-6.10949 -3.45493,-7.50125 19.84919,-23.24187 36.87485,-35.10959 0,0 8.75961,-5.82047 14.75794,-5.79824 0.53803,-0.249 0.85373,-0.38684 0.85373,-0.38684 l -0.0222,0.38684 c 1.26725,0.0578 2.5345,0.23567 3.81065,0.55137 l 1.89421,0.47133 c 10.46707,2.59675 16.84335,13.18388 14.2466,23.6465 l -14.56675,58.7472 -6.58972,26.53228 c -6.10949,24.63363 18.98657,-5.35359 24.21566,6.00723 3.45493,7.49235 -20.27161,23.12626 -37.29282,34.99398 z m 36.93264,-183.6139 c -3.63724,14.65123 -18.46187,23.58425 -33.10866,19.94701 -14.65566,-3.63724 -23.5887,-18.45743 -19.95146,-33.11311 3.63725,-14.65567 18.46189,-23.58425 33.10866,-19.94701 14.65569,3.63279 23.58426,18.45744 19.95146,33.11311 z"
- id="path2"
- inkscape:connector-curvature="0"
- style="fill:#c8c8c8;fill-opacity:1;stroke-width:4.44650316"
- sodipodi:nodetypes="ccccccccccccccccccccccccscc" />
- <circle
- style="fill:none;fill-opacity:1;stroke:#c8c8c8;stroke-width:21.39488792;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="path4522"
- cx="356.2576"
- cy="511.83615"
- r="178.27893" />
- </g>
-</svg>
diff --git a/tagit/assets/themes/default/style.kv b/tagit/assets/themes/default/style.kv
new file mode 100644
index 0000000..a3f9cd1
--- /dev/null
+++ b/tagit/assets/themes/default/style.kv
@@ -0,0 +1,206 @@
+
+# DEBUG: Draw borders around all widgets
+#<Widget>:
+# canvas.after:
+# Line:
+# rectangle: self.x+1,self.y+1,self.width-1,self.height-1
+# dash_offset: 5
+# dash_length: 3
+
+# color definitions
+#:set colors_background [0x1c/256, 0x1b/256, 0x22/256] # dark grey
+#:set colors_text [0xc5/256, 0xc9/256, 0xc7/256] # silver
+#:set colors_highlight [0xb5/256, 0x94/256, 0x10/256] # darkgold
+
+# generic styles
+
+<Label>:
+ # default text color
+ color: colors_text
+
+
+# main window elements
+
+<MainWindow>:
+ # background color
+ canvas.before:
+ Color:
+ rgb: colors_background
+ Rectangle:
+ pos: self.pos
+ size: self.size
+
+<HGuide>: # Horizontal guide
+ canvas:
+ Color:
+ rgb: colors_text
+ Line:
+ points: self.x, self.center_y, self.x + self.width, self.center_y
+ width: 2
+
+
+# browser elements
+
+<BrowserItem>:
+ canvas.after:
+ # selection highlighting
+ Color:
+ rgba: colors_highlight + [1 if self.is_selected else 0]
+
+ # checkmarks
+ #Ellipse:
+ # pos: self.x + 5, self.y + self.height - 30
+ # size: 25, 25
+ #Color:
+ # rgba: [1,1,1] + [1 if self.is_selected else 0]
+ #Line:
+ # width: 3
+ # points:
+ # self.x + 12, self.y + self.height - 20, \
+ # self.x + 17, self.y + self.height - 23, \
+ # self.x + 22, self.y + self.height - 12
+
+ # border highlight
+ Line:
+ width: 2
+ points:
+ self.x, self.y + self.height - 60, \
+ self.x, self.y + self.height, \
+ self.x + 60, self.y + self.height
+ Triangle:
+ points:
+ self.x, self.y + self.height - 40, \
+ self.x, self.y + self.height, \
+ self.x + 40, self.y + self.height
+ Line:
+ width: 2
+ points:
+ self.x + self.width - 40, \
+ self.y, self.x + self.width, \
+ self.y, self.x + self.width, self.y + 40
+
+ # cursor highlighting
+ Color:
+ rgba: colors_text + [1 if self.is_cursor else 0]
+ Line:
+ width: 2
+ rectangle: self.x, self.y, self.width, self.height
+
+
+# filter elements
+
+<Addressbar>:
+ background_color: (0.2,0.2,0.2,1) if self.focus else (0.15,0.15,0.15,1)
+ foreground_color: (1,1,1,1)
+
+<Shingle>:
+ canvas.before:
+ Color:
+ rgba: colors_highlight + [0.25 if root.active else 0]
+ RoundedRectangle:
+ pos: root.pos
+ size: root.size
+
+ canvas.after:
+ Color:
+ rgb: colors_text
+ Line:
+ rounded_rectangle: self.x+1, self.y+1, self.width-1, self.height-1, self.height/2
+
+<Avatar>:
+ canvas.before:
+ Color:
+ rgb: colors_background
+ Ellipse:
+ pos: self.pos
+ size: self.size
+
+ canvas.after:
+ Color:
+ rgb: colors_text
+ Line:
+ width: 2
+ circle: self.center_x, self.center_y, self.height/2.0
+
+
+
+<ShingleText>:
+ canvas.after:
+ Color:
+ rgba: colors_background + [0.5 if not self.active else 0]
+ Rectangle:
+ pos: self.pos
+ size: self.size
+
+<ShingleRemove>:
+ background_color: colors_background
+ background_normal: ''
+ opacity: 0.5
+
+
+# other elements
+
+<Action>:
+ # decoration
+ canvas.before:
+ Color:
+ rgba: 17 / 255, 32 / 255, 148 / 255, self.selected_alpha
+ Rectangle:
+ pos: self.x, self.y + 1
+ size: self.size
+
+ canvas.after:
+ Color:
+ rgba: 17 / 255, 32 / 255, 148 / 255, self.selected_alpha
+ Line:
+ width: 2
+ rectangle: self.x, self.y, self.width, self.height
+
+
+<DialogueContentBase>:
+ 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
+
+<DialogueTitle>:
+ font_size: '16sp'
+ 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
+
+
+
+## EOF ##
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 ##
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 ##
diff --git a/tagit/widgets/browser.kv b/tagit/widgets/browser.kv
index 8b4c8c3..63495be 100644
--- a/tagit/widgets/browser.kv
+++ b/tagit/widgets/browser.kv
@@ -11,19 +11,6 @@
is_cursor: False
is_selected: False
- canvas.after:
- Color:
- rgba: 1,1,1, 1 if self.is_cursor else 0
- Line:
- width: 2
- rectangle: self.x, self.y, self.width, self.height
-
- Color:
- rgba: self.scolor + [0.5 if self.is_selected else 0]
- Rectangle:
- pos: self.x, self.center_y - int(self.height) / 2
- size: self.width, self.height
-
<BrowserImage>: # This be an image
preview: image
@@ -58,6 +45,11 @@
# opacity: root.is_group and 1.0 or 0.0
# show: 'image',
+<BrowserDescriptionLabel@Label>:
+ halign: 'left'
+ valign: 'center'
+ text_size: self.size
+
<BrowserDescription>: # This be a list item
spacer: 20
preview: image
@@ -68,12 +60,9 @@
# actual size is set in code
pos: 0, 0
- Label:
+ BrowserDescriptionLabel:
text: root.text
markup: True
- halign: 'left'
- valign: 'center'
- text_size: self.size
size_hint: None, 1
width: root.width - image.width - root.spacer - 35
pos: root.height + root.spacer, 0
diff --git a/tagit/widgets/browser.py b/tagit/widgets/browser.py
index 1e42c9c..bbc3748 100644
--- a/tagit/widgets/browser.py
+++ b/tagit/widgets/browser.py
@@ -281,7 +281,6 @@ class Browser(GridLayout, StorageAwareMixin, ConfigAwareMixin):
def on_cursor(self, sender, cursor):
if cursor is not None:
- #self.root.status.dispatch('on_status', os.path.basename(next(iter(cursor.guids))))
self.root.status.dispatch('on_status', cursor.filename(default=''))
def on_items(self, sender, items):
@@ -347,10 +346,7 @@ class Browser(GridLayout, StorageAwareMixin, ConfigAwareMixin):
self.clear_widgets()
for itm in range(self.page_size):
- wx = factory(
- browser=self,
- scolor=self.root.session.cfg('ui', 'standalone', 'browser', 'select_color'),
- )
+ wx = factory(browser=self)
self.bind(selection=wx.on_selection)
self.bind(cursor=wx.on_cursor)
self.add_widget(wx)
@@ -484,7 +480,6 @@ class BrowserItem(RelativeLayout):
is_cursor = kp.BooleanProperty(False)
is_selected = kp.BooleanProperty(False)
is_group = kp.BooleanProperty(False)
- scolor = kp.ListProperty([1, 0, 0]) # FIXME: set from config
def update(self, obj):
self.obj = obj
diff --git a/tagit/widgets/filter.kv b/tagit/widgets/filter.kv
index b638570..df9a678 100644
--- a/tagit/widgets/filter.kv
+++ b/tagit/widgets/filter.kv
@@ -1,4 +1,5 @@
#:import SearchmodeSwitch tagit.actions.filter
+#:import AddToken tagit.actions.filter
#-- #:import SortKey tagit.actions.search
<Filter>:
@@ -14,6 +15,10 @@
# Tokens will be inserted here
+ AddToken:
+ show: 'image',
+ root: root.root
+
SearchmodeSwitch:
show: 'image',
root: root.root
@@ -30,55 +35,37 @@
root: root.root
name: 'filter'
orientation: 'lr-tb'
- # space for 2 buttons
- width: 3*30 + 2*5
- size_hint: None, 1.0
+ # space for two buttons
+ width: 2*30 + 5
spacing: 5
+ size_hint: None, 1
button_height: 30
button_show: 'image',
+<Avatar@Label>:
+ active: False
+
+<ShingleText@Label>:
+ active: False
+
<Shingle>:
orientation: 'horizontal'
label: tlabel
- canvas.before:
- Color:
- rgba: 0,0,1, 0.25 if root.active else 0
- Rectangle:
- pos: root.pos
- size: root.size
+ Avatar:
+ id: avatar
+ text: 'T'
+ size_hint: None, None
+ width: self.parent.height
+ height: self.parent.height
+ active: root.active
- canvas.after:
- Color:
- rgba: 1,1,1,1
- Line:
- rectangle: self.x+1, self.y+1, self.width-1, self.height-1
-
- Label:
+ ShingleText:
id: tlabel
text: root.text
-
- canvas.after:
- Color:
- rgba: 0,0,0,0.5 if not root.active else 0
- Rectangle:
- pos: self.pos
- size: self.size
-
-
- Button:
- text: 'x'
- bold: True
- opacity: 0.5
- width: 20
- size_hint: None, 1.0
- background_color: [0,0,0,0]
- background_normal: ''
- on_press: root.remove()
+ active: root.active
<Addressbar>:
multiline: False
- background_color: (0.2,0.2,0.2,1) if self.focus else (0.15,0.15,0.15,1)
- foreground_color: (1,1,1,1)
## EOF ##
diff --git a/tagit/widgets/status.kv b/tagit/widgets/status.kv
index 2d49b15..0a680ab 100644
--- a/tagit/widgets/status.kv
+++ b/tagit/widgets/status.kv
@@ -1,5 +1,13 @@
#-- #:import ButtonDock tagit.widgets.dock.ButtonDock # FIXME: mb/port
+<NavigationLabel@Label>:
+ markup: True
+
+<StatusLabel@Label>:
+ markup: True
+ valign: 'middle'
+ halign: 'center'
+
<Status>:
orientation: 'horizontal'
status: ''
@@ -18,11 +26,10 @@
button_height: 30
button_show: 'image',
- Label:
+ NavigationLabel:
id: navigation_label
size_hint: None, 1
width: 180
- markup: True
text: root.navigation
ButtonDock:
@@ -36,13 +43,10 @@
button_height: 30
button_show: 'image',
- Label:
+ StatusLabel:
# gets remaining size
id: status_label
text_size: self.size
- markup: True
- valign: 'middle'
- halign: 'left'
text: root.status
ButtonDock:
diff --git a/tagit/windows/desktop.kv b/tagit/windows/desktop.kv
index cbc5c48..685cc10 100644
--- a/tagit/windows/desktop.kv
+++ b/tagit/windows/desktop.kv
@@ -1,13 +1,9 @@
+#:import TileDecorationRoundedBorder tagit.tiles.decoration.TileDecorationRoundedBorder
#:import TileDecorationBorder tagit.tiles.decoration.TileDecorationBorder
#:import TileDecorationFilledRectangle tagit.tiles.decoration.TileDecorationFilledRectangle
-# DEBUG: Draw borders around all widgets
-#<Widget>:
-# canvas.after:
-# Line:
-# rectangle: self.x+1,self.y+1,self.width-1,self.height-1
-# dash_offset: 5
-# dash_length: 3
+<HGuide@Widget>:
+
<MainWindow>:
# main content
@@ -15,110 +11,89 @@
browser: browser
filter: filter
status: status
- # required by actions.planes
- planes: planes
# required by Menu
context: context
- Carousel:
- id: planes
- loop: True
- scroll_timeout: 0 # disables switching by touch event
- # plane references
- dashboard: dashboard
- browsing: browsing
- codash: codash
+ BoxLayout:
+ orientation: 'vertical'
- # planes
+ Widget:
+ height: 5
+ size_hint: 1, None
- TileDock: # static dashboard plane
- id: dashboard
+ Filter:
+ id: filter
root: root
- # plane config
- size_hint: 1, 1
- visible: planes.current_slide == self
- # dock config
- name: 'dashboard'
- decoration: TileDecorationBorder
- cols: 3
- rows: 2
- # self.size won't be updated correctly
- tile_width: self.width / self.cols
- tile_height: self.height / self.rows
-
- BoxLayout: # browsing plane
- id: browsing
+ size_hint: 1, None
+ height: 30
+
+ HGuide:
+ height: 20
+ size_hint: 1, None
+
+ Widget: # spacer
+ height: 20
+ size_hint: 1, None
+
+ BoxLayout:
orientation: 'horizontal'
- visible: planes.current_slide == self
ButtonDock: # one column of buttons on the left
root: root
- orientation: 'tb-lr'
+ orientation: 'lr-tb'
# one column of buttons
- width: 30 + 2*10
+ width: 1*30 + 2*10
name: 'sidebar_left'
spacing: 10
padding: 10
- size_hint: None, 1
+ size_hint: None, None
button_height: 30
button_show: 'image',
+ # adjust height automatically to content
+ height: self.minimum_height
+ pos_hint: {'center_y': 0.5}
- BoxLayout: # main content
- orientation: 'vertical'
+ Widget: # spacer
+ width: 20 # ButtonDock already has a space of 10px
+ size_hint: None, 1
+
+ Browser: # browsing space
+ id: browser
+ root: root
size_hint: 1, 1
- BoxLayout:
- orientation: 'horizontal'
- size_hint: 1, 1
- current: 0
-
- BoxLayout:
- orientation: 'vertical'
- size_hint: 1, 1
-
- Filter:
- id: filter
- root: root
- size_hint: 1, None
- height: 30
-
- Browser:
- id: browser
- root: root
- size_hint: 1, 0.96
-
- Status:
- id: status
- root: root
- size_hint: 1, None
- height: 30
-
+ Widget: # spacer
+ width: 30
+ size_hint: None, 1
+
TileDock: # context info to the right
root: root
- visible: planes.current_slide == self.parent
name: 'sidebar_right'
- decoration: TileDecorationFilledRectangle
+ decoration: TileDecorationRoundedBorder
+ visible: True
cols: 1
- rows: 3
+ rows: 1
+ width: 220
+ size_hint: None, None
# self.height won't be updated correctly
#tile_height: self.size[1] / 4
- width: 180
- size_hint: None, 1
-
- TileDock: # contextual dashboard
- id: codash
+ #height: sum(tile.client.default_size[1] for tile in self.children)
+ height: self.parent.height / 2
+ pos_hint: {'center_y': 0.5}
+
+ Widget: # spacer
+ height: 20
+ size_hint: 1, None
+
+ HGuide:
+ height: 20
+ size_hint: 1, None
+
+ Status:
+ id: status
root: root
- # plane config
- size_hint: 1, 1
- visible: planes.current_slide == self
- # dock config
- name: 'codash'
- decoration: TileDecorationBorder
- cols: 4
- rows: 2
- # self.size won't be update correctly
- tile_width: self.width / 4
- tile_height: self.height / 2
+ size_hint: 1, None
+ height: 30
Context: # context menu
id: context
diff --git a/tagit/windows/desktop.py b/tagit/windows/desktop.py
index 42b279e..60e23d4 100644
--- a/tagit/windows/desktop.py
+++ b/tagit/windows/desktop.py
@@ -17,8 +17,9 @@ from kivy.uix.floatlayout import FloatLayout
import kivy.properties as kp
# import Image and Loader to overwrite their caches later on
-from kivy.loader import Loader
from kivy.cache import Cache
+from kivy.loader import Loader
+from kivy.resources import resource_find
# tagit imports
from tagit import actions, config, dialogues
@@ -44,6 +45,8 @@ logger = logging.getLogger(__name__)
# load kv
Builder.load_file(os.path.join(os.path.dirname(__file__), 'desktop.kv'))
+# load styles
+Builder.load_file(resource_find('default/style.kv'))
# classes
class MainWindow(FloatLayout):
@@ -80,6 +83,9 @@ class MainWindow(FloatLayout):
# bind pre-close checks
from kivy.core.window import Window
Window.bind(on_request_close=self.on_request_close)
+ Window.size = tuple(cfg('ui', 'standalone', 'window_size'))
+ if cfg('ui', 'standalone', 'maximize'):
+ Window.maximize()
## properties
@@ -96,14 +102,6 @@ class MainWindow(FloatLayout):
## startup and shutdown
def on_startup(self):
- # switch to starting plane - if it's the dashboard no action is needed
- if self.session.cfg('ui', 'standalone', 'plane') == 'browsing':
- self.trigger('ShowBrowsing')
-
- # show welcome message
- if self.session.cfg('session', 'first_start'): # FIXME: mb/port: move to starting app
- self.display_welcome()
-
# run script
for args in self.session.cfg('session', 'script'):
if isinstance(args, str):
@@ -129,29 +127,20 @@ class MainWindow(FloatLayout):
#App.get_running_app().stop() # FIXME: mb/port: from CloseSessionAndExit
return False
- def display_welcome(self):
- """Display a welcome dialogue on the first start."""
- message = """
-[size=20sp]Welcome to [b]tagit[/b]![/size]
-
-Since you see this message, it's time to configure tagit. It's a good idea to get familiar with the configuration. Hit F1 or the config button to see all relevant settings. There, you can also get rid of this message. If you desire more flexibility, you can edit the config file directly. Check out the project homepage for more details.
-""" # FIXME!
- dialogues.Message(text=message, align='left').open()
-
## config ##
-config.declare(('session', 'first_start'), config.Bool(), True,
- __name__, 'First start', 'Show the welcome message typically shown when tagit is started the first time.')
-
config.declare(('session', 'script'), config.List(config.Any()), [],
__name__, 'start script', 'Actions to run after startup. Intended for testing.')
config.declare(('session', 'script_delay'), config.Unsigned(), 0,
__name__, 'script delay', 'Start script execution delay in seconds.')
-config.declare(('ui', 'standalone', 'plane'), config.Enum('browsing', 'dashboard'), 'dashboard',
- __name__, 'Initial plane', 'Start with the dashboard or browsing plane.')
+config.declare(('ui', 'standalone', 'maximize'), config.Bool(), False,
+ __name__, 'Window maximization', 'Maximize the window upon startup.')
+
+config.declare(('ui', 'standalone', 'window_size'), config.List(config.Unsigned()), (1024, 768),
+ __name__, 'Wndow size', 'Set the window size upon startup.')
config.declare(('ui', 'standalone', 'browser', 'cache_size'), config.Unsigned(), 1000,
__name__, 'Cache size', 'Number of preview images that are held in the cache. Should be high or zero if memory is not an issue. Set to a small value to preserve memory, but should be at least the most common page size. It is advised to set a value in accordance with `ui.standalone.browser.cache_items`. If zero, no limit applies.')