]> source.dussan.org Git - tigervnc.git/commitdiff
Respect selection color in monitor widget
authorPierre Ossman <ossman@cendio.se>
Fri, 14 Jan 2022 18:49:12 +0000 (19:49 +0100)
committerPierre Ossman <ossman@cendio.se>
Thu, 13 Jul 2023 14:55:19 +0000 (16:55 +0200)
We should have a consistent color set over all widgets.

vncviewer/fltk/Fl_Monitor_Arrangement.cxx
vncviewer/fltk/Fl_Monitor_Arrangement.h

index 3dddd8019c9e84c8d27d8d61d003bde3a85bcbcc..7c72ff68f2df2a7821f54c0266d6c602bcfbd702 100644 (file)
@@ -61,7 +61,6 @@ static const Fl_Boxtype FL_CHECKERED_BOX = FL_FREE_BOXTYPE;
 Fl_Monitor_Arrangement::Fl_Monitor_Arrangement(
    int x, int y, int w, int h)
 :  Fl_Group(x, y, w, h),
-   SELECTION_COLOR(fl_lighter(FL_BLUE)),
    AVAILABLE_COLOR(fl_lighter(fl_lighter(fl_lighter(FL_BACKGROUND_COLOR))))
 {
   // Used for required monitors.
@@ -124,11 +123,11 @@ void Fl_Monitor_Arrangement::draw()
 
     if (is_required(iter->first)) {
       monitor->box(FL_CHECKERED_BOX);
-      monitor->color(SELECTION_COLOR);
+      monitor->color(FL_SELECTION_COLOR);
     } else {
       monitor->box(FL_BORDER_BOX);
       monitor->color(AVAILABLE_COLOR);
-      monitor->selection_color(SELECTION_COLOR);
+      monitor->selection_color(FL_SELECTION_COLOR);
     }
   }
 
index b8e9ba78248c59780e51ee6b3605dfee834b8b74..c71dd199d5a2feb1410799892980a79d38ddfda4 100644 (file)
@@ -48,7 +48,6 @@ protected:
   virtual void draw();
 
 private:
-  const Fl_Color SELECTION_COLOR;
   const Fl_Color AVAILABLE_COLOR;
   typedef std::map<int, Fl_Button *> MonitorMap;
   MonitorMap monitors;