[node-patches] Change in ovirt-node[master]: tui: Group element styles

fabiand at fedoraproject.org fabiand at fedoraproject.org
Tue Dec 11 20:09:38 UTC 2012


Fabian Deutsch has uploaded a new change for review.

Change subject: tui: Group element styles
......................................................................

tui: Group element styles

Previously the palette for each element had to be given seperately, now
similar element use a central dict.

Change-Id: I12b29c294d2e2a4c4637ed56c637131c633f9e23
Signed-off-by: Fabian Deutsch <fabiand at fedoraproject.org>
---
M scripts/tui/src/ovirt/node/tui.py
1 file changed, 18 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/23/9923/1

diff --git a/scripts/tui/src/ovirt/node/tui.py b/scripts/tui/src/ovirt/node/tui.py
index 6413fe9..47c5ad8 100644
--- a/scripts/tui/src/ovirt/node/tui.py
+++ b/scripts/tui/src/ovirt/node/tui.py
@@ -56,37 +56,42 @@
     header = u"\n Configuration TUI\n"
     footer = u"Press ctrl+c to exit"
 
+    element_styles = {
+        "text": "dark gray",
+        "label": "dark gray, bold",
+    }
+
     palette = [(None, 'default', 'light gray', 'bold', None, None),
                ('screen', None),
                ('header', 'white', 'dark blue'),
-               ('table', 'dark gray'),
-               ('table.label', 'dark gray, bold'),
-               ('table.header', 'dark gray, bold'),
-               ('table.entry', 'dark gray'),
+               ('table', element_styles["text"]),
+               ('table.label', element_styles["label"]),
+               ('table.header', element_styles["label"]),
+               ('table.entry', element_styles["text"]),
                ('table.entry:focus', 'white', 'light blue'),
                ('main.menu', 'black'),
-               ('main.menu.frame', 'dark gray'),
+               ('main.menu.frame', element_styles["text"]),
                ('notice', 'light red'),
-               ('plugin.widget.entry', 'dark gray'),
+               ('plugin.widget.entry', element_styles["text"]),
                ('plugin.widget.entry.disabled', 'dark gray', 'light gray'),
-               ('plugin.widget.entry.label', 'dark gray, bold'),
-               ('plugin.widget.entry.frame', 'dark gray'),
+               ('plugin.widget.entry.label', element_styles["label"]),
+               ('plugin.widget.entry.frame', element_styles["text"]),
                ('plugin.widget.entry.frame.invalid', 'dark red'),
                ('plugin.widget.notice', 'light red'),
                ('plugin.widget.header', 'black, bold'),
-               ('plugin.widget.divider', 'dark gray'),
+               ('plugin.widget.divider', element_styles["text"]),
                ('plugin.widget.button', 'dark blue'),
                ('plugin.widget.button.disabled', 'light gray'),
-               ('plugin.widget.label', 'dark gray'),
-               ('plugin.widget.label.keyword', 'black,bold'),
+               ('plugin.widget.label', element_styles["text"]),
+               ('plugin.widget.label.keyword', element_styles["label"]),
                ('plugin.widget.progressbar.box', 'light gray'),
                ('plugin.widget.progressbar.uncomplete', None),
                ('plugin.widget.progressbar.complete', None, 'light gray'),
-               ('plugin.widget.options.label', 'dark gray, bold'),
+               ('plugin.widget.options.label', element_styles["label"]),
                ('plugin.widget.dialog', None),
                ('plugin.widget.page', None),
                ('plugin.widget.page.frame', None),
-               ('plugin.widget.checkbox.label', 'dark gray, bold'),
+               ('plugin.widget.checkbox.label', element_styles["label"]),
                ]
 
     def __init__(self, app):


--
To view, visit http://gerrit.ovirt.org/9923
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I12b29c294d2e2a4c4637ed56c637131c633f9e23
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: Fabian Deutsch <fabiand at fedoraproject.org>



More information about the node-patches mailing list