NSM: Make GUI a little prettier than the FLTK defaults.

This commit is contained in:
Jonathan Moore Liles 2012-03-03 23:54:41 -08:00
parent d295593e55
commit e0e593277f
2 changed files with 15 additions and 6 deletions

View File

@ -22,7 +22,7 @@ src/nsmd: src/nsmd.o nonlib/libnonlib.a
src/session-manager: src/session-manager.o nonlib/libnonlib.a src/session-manager: src/session-manager.o nonlib/libnonlib.a
@ echo -n Linking session handler. @ 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 src/send_osc: src/send_osc.o nonlib/libnonlib.a
@ $(CXX) $(CXXFLAGS) $(LIBS) src/send_osc.o -o $@ -Lnonlib -lnonlib && echo $(DONE) @ $(CXX) $(CXXFLAGS) $(LIBS) src/send_osc.o -o $@ -Lnonlib -lnonlib && echo $(DONE)

View File

@ -47,6 +47,9 @@
#define APP_NAME "Non Session Manager" #define APP_NAME "Non Session Manager"
#include "FL/Crystal_Boxtypes.H"
#include "FL/Gleam_Boxtypes.H"
#include "FL/color_scheme.H"
#ifdef HAVE_XPM #ifdef HAVE_XPM
#include "FL/Fl.H" #include "FL/Fl.H"
@ -127,7 +130,7 @@ public:
{ {
_remove_button->show(); _remove_button->show();
_restart_button->show(); _restart_button->show();
color( FL_RED ); color( fl_darker( FL_RED ) );
redraw(); redraw();
} }
else else
@ -153,14 +156,14 @@ public:
if ( ! strcmp( command, "ready" ) ) if ( ! strcmp( command, "ready" ) )
{ {
color( FL_GREEN ); color( fl_darker( FL_GREEN ) );
// _progress->value( 0.0f ); // _progress->value( 0.0f );
} }
else if ( ! strcmp( command, "quit" ) || else if ( ! strcmp( command, "quit" ) ||
! strcmp( command, "kill" ) || ! strcmp( command, "kill" ) ||
! strcmp( command, "error" ) ) ! strcmp( command, "error" ) )
{ {
color( FL_RED ); color( fl_darker( FL_RED ) );
} }
else if ( ! strcmp( command, "stopped" ) ) else if ( ! strcmp( command, "stopped" ) )
{ {
@ -168,7 +171,7 @@ public:
} }
else else
{ {
color( FL_YELLOW ); color( fl_darker( FL_YELLOW ) );
} }
redraw(); redraw();
@ -222,7 +225,7 @@ public:
_client_id = NULL; _client_id = NULL;
align( FL_ALIGN_LEFT | FL_ALIGN_INSIDE ); align( FL_ALIGN_LEFT | FL_ALIGN_INSIDE );
color( FL_RED ); color( fl_darker( FL_RED ) );
box( FL_UP_BOX ); box( FL_UP_BOX );
{ Fl_Progress *o = _progress = new Fl_Progress( ( X + W ) - ( W / 4) - 20, Y + 5, ( W / 4 ), H - 10, NULL ); { 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 ); Fl_Pack *o = clients_pack = new Fl_Pack( X + ( W / 3 ), Y + 50, ( W / 3 ) * 2, H - 50 );
o->align( FL_ALIGN_TOP ); o->align( FL_ALIGN_TOP );
o->spacing( 2 );
o->type( Fl_Pack::VERTICAL ); o->type( Fl_Pack::VERTICAL );
o->end(); o->end();
} }
@ -937,7 +941,12 @@ main (int argc, char **argv )
(char**)icon_16x16, &p, &mask, NULL); (char**)icon_16x16, &p, &mask, NULL);
#endif #endif
init_crystal_boxtypes();
init_gleam_boxtypes();
Fl::get_system_colors(); Fl::get_system_colors();
color_scheme( "Dark" );
Fl::scheme( "plastic" ); Fl::scheme( "plastic" );
Fl::lock(); Fl::lock();