From e0e593277f8371eacd35ccb9eae15ea074835c44 Mon Sep 17 00:00:00 2001 From: Jonathan Moore Liles Date: Sat, 3 Mar 2012 23:54:41 -0800 Subject: [PATCH] NSM: Make GUI a little prettier than the FLTK defaults. --- session-manager/makefile.inc | 2 +- session-manager/src/session-manager.C | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/session-manager/makefile.inc b/session-manager/makefile.inc index fa0a1a1..a521781 100644 --- a/session-manager/makefile.inc +++ b/session-manager/makefile.inc @@ -22,7 +22,7 @@ src/nsmd: src/nsmd.o nonlib/libnonlib.a src/session-manager: src/session-manager.o nonlib/libnonlib.a @ echo -n Linking session handler. - @ $(CXX) $(CXXFLAGS) $(FLTK_LIBS) $(XPM_LIBS) $(LIBS) src/session-manager.o -o $@ -Lnonlib -lnonlib && echo $(DONE) + @ $(CXX) $(CXXFLAGS) $(FLTK_LIBS) $(XPM_LIBS) $(LIBS) src/session-manager.o -o $@ -LFL -lfl_widgets -Lnonlib -lnonlib && echo $(DONE) src/send_osc: src/send_osc.o nonlib/libnonlib.a @ $(CXX) $(CXXFLAGS) $(LIBS) src/send_osc.o -o $@ -Lnonlib -lnonlib && echo $(DONE) diff --git a/session-manager/src/session-manager.C b/session-manager/src/session-manager.C index 775e616..a81eef7 100644 --- a/session-manager/src/session-manager.C +++ b/session-manager/src/session-manager.C @@ -47,6 +47,9 @@ #define APP_NAME "Non Session Manager" +#include "FL/Crystal_Boxtypes.H" +#include "FL/Gleam_Boxtypes.H" +#include "FL/color_scheme.H" #ifdef HAVE_XPM #include "FL/Fl.H" @@ -127,7 +130,7 @@ public: { _remove_button->show(); _restart_button->show(); - color( FL_RED ); + color( fl_darker( FL_RED ) ); redraw(); } else @@ -153,14 +156,14 @@ public: if ( ! strcmp( command, "ready" ) ) { - color( FL_GREEN ); + color( fl_darker( FL_GREEN ) ); // _progress->value( 0.0f ); } else if ( ! strcmp( command, "quit" ) || ! strcmp( command, "kill" ) || ! strcmp( command, "error" ) ) { - color( FL_RED ); + color( fl_darker( FL_RED ) ); } else if ( ! strcmp( command, "stopped" ) ) { @@ -168,7 +171,7 @@ public: } else { - color( FL_YELLOW ); + color( fl_darker( FL_YELLOW ) ); } redraw(); @@ -222,7 +225,7 @@ public: _client_id = NULL; align( FL_ALIGN_LEFT | FL_ALIGN_INSIDE ); - color( FL_RED ); + color( fl_darker( FL_RED ) ); box( FL_UP_BOX ); { Fl_Progress *o = _progress = new Fl_Progress( ( X + W ) - ( W / 4) - 20, Y + 5, ( W / 4 ), H - 10, NULL ); @@ -659,6 +662,7 @@ public: { Fl_Pack *o = clients_pack = new Fl_Pack( X + ( W / 3 ), Y + 50, ( W / 3 ) * 2, H - 50 ); o->align( FL_ALIGN_TOP ); + o->spacing( 2 ); o->type( Fl_Pack::VERTICAL ); o->end(); } @@ -937,7 +941,12 @@ main (int argc, char **argv ) (char**)icon_16x16, &p, &mask, NULL); #endif + init_crystal_boxtypes(); + init_gleam_boxtypes(); + Fl::get_system_colors(); + + color_scheme( "Dark" ); Fl::scheme( "plastic" ); Fl::lock();