[Pkg-wmaker-commits] [wmforecast] 02/10: wmforecast.c: Move default colors to #defines.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Mon Aug 17 11:20:41 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch upstream
in repository wmforecast.
commit cba137e5a9862e82509ac51a024aa761ed1e3386
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Wed Oct 29 11:45:51 2014 -0500
wmforecast.c: Move default colors to #defines.
---
wmforecast.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/wmforecast.c b/wmforecast.c
index 5f53b3a..31d7806 100755
--- a/wmforecast.c
+++ b/wmforecast.c
@@ -31,6 +31,9 @@
#define color(c) WMCreateNamedColor(screen,c,True)
+#define DEFAULT_TEXT_COLOR "light sea green"
+#define DEFAULT_BG_COLOR "black"
+
typedef struct {
char *units;
char *woeid;
@@ -259,20 +262,20 @@ Dockapp *newDockapp(WMScreen *screen, Preferences *prefs, int argc, char **argv)
frame = WMCreateFrame(window);
WMSetFrameRelief(frame,WRSunken);
WMResizeWidget(frame,56,56);
- WMSetWidgetBackgroundColor(frame,color("black"));
+ WMSetWidgetBackgroundColor(frame,color(DEFAULT_BG_COLOR));
WMRealizeWidget(frame);
dockapp->text = WMCreateLabel(frame);
- WMSetWidgetBackgroundColor(dockapp->text, color("black"));
+ WMSetWidgetBackgroundColor(dockapp->text, color(DEFAULT_BG_COLOR));
WMSetLabelFont(dockapp->text, WMCreateFont(screen, "-Misc-Fixed-Medium-R-SemiCondensed--13-120-75-75-C-60-ISO10646-1"));
- WMSetLabelTextColor(dockapp->text, color("Light sea green"));
+ WMSetLabelTextColor(dockapp->text, color(DEFAULT_TEXT_COLOR));
WMSetLabelTextAlignment (dockapp->text, WACenter);
WMResizeWidget(dockapp->text,52,14);
WMMoveWidget(dockapp->text,2,40);
WMRealizeWidget(dockapp->text);
dockapp->icon = WMCreateLabel(frame);
- WMSetWidgetBackgroundColor(dockapp->icon,color("black"));
+ WMSetWidgetBackgroundColor(dockapp->icon,color(DEFAULT_BG_COLOR));
WMRealizeWidget(dockapp->icon);
WMSetLabelImagePosition(dockapp->icon,WIPImageOnly);
WMResizeWidget(dockapp->icon,32,32);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmforecast.git
More information about the Pkg-wmaker-commits
mailing list