Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
topydo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
topydo
Commits
7ea66ee2
Commit
7ea66ee2
authored
Apr 19, 2016
by
Bram Schoenmakers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't show colors in column UI when the user disabled it
parent
224e414a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
topydo/ui/Main.py
topydo/ui/Main.py
+4
-0
topydo/ui/TodoWidget.py
topydo/ui/TodoWidget.py
+4
-3
No files found.
topydo/ui/Main.py
View file @
7ea66ee2
...
@@ -163,6 +163,10 @@ class UIApplication(CLIApplicationBase):
...
@@ -163,6 +163,10 @@ class UIApplication(CLIApplicationBase):
self
.
_set_alarm_for_next_midnight_update
()
self
.
_set_alarm_for_next_midnight_update
()
def
_create_color_palette
(
self
):
def
_create_color_palette
(
self
):
if
not
config
().
colors
():
# return an empty palette:
return
[]
project_color
=
to_urwid_color
(
config
().
project_color
())
project_color
=
to_urwid_color
(
config
().
project_color
())
context_color
=
to_urwid_color
(
config
().
context_color
())
context_color
=
to_urwid_color
(
config
().
context_color
())
metadata_color
=
to_urwid_color
(
config
().
metadata_color
())
metadata_color
=
to_urwid_color
(
config
().
metadata_color
())
...
...
topydo/ui/TodoWidget.py
View file @
7ea66ee2
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
import
re
import
re
import
urwid
import
urwid
from
topydo.lib.Config
import
config
from
topydo.lib.ListFormat
import
ListFormatParser
from
topydo.lib.ListFormat
import
ListFormatParser
from
topydo.lib.ProgressColor
import
progress_color
from
topydo.lib.ProgressColor
import
progress_color
from
topydo.ui.Utils
import
PaletteItem
,
to_urwid_color
from
topydo.ui.Utils
import
PaletteItem
,
to_urwid_color
...
@@ -86,7 +87,7 @@ class TodoWidget(urwid.WidgetWrap):
...
@@ -86,7 +87,7 @@ class TodoWidget(urwid.WidgetWrap):
priority_widget = urwid.Text(priority_text)
priority_widget = urwid.Text(priority_text)
self.text_widget = urwid.Text(txt_markup)
self.text_widget = urwid.Text(txt_markup)
progress = to_urwid_color(progress_color(p_todo))
progress = to_urwid_color(progress_color(p_todo))
if config().colors() else PaletteItem.DEFAULT
progress_bar = urwid.AttrMap(
progress_bar = urwid.AttrMap(
urwid.SolidFill('
'),
urwid.SolidFill('
'),
urwid.AttrSpec(PaletteItem.DEFAULT, progress, 256),
urwid.AttrSpec(PaletteItem.DEFAULT, progress, 256),
...
@@ -106,8 +107,8 @@ class TodoWidget(urwid.WidgetWrap):
...
@@ -106,8 +107,8 @@ class TodoWidget(urwid.WidgetWrap):
self.widget = urwid.AttrMap(
self.widget = urwid.AttrMap(
self.columns,
self.columns,
_markup(p_todo,
False), # no focus
_markup(p_todo,
p_focus=False),
_markup(p_todo,
True) # focus
_markup(p_todo,
p_focus=True)
)
)
super().__init__(self.widget)
super().__init__(self.widget)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment