aboutsummaryrefslogtreecommitdiffstats
path: root/vncviewer/vncviewer.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2022-09-07 10:41:44 +0200
committerPierre Ossman <ossman@cendio.se>2022-09-07 10:43:31 +0200
commitadf32175be3b2357d33752750d5b98a34dadb274 (patch)
treec4166f4d856b0d4cdfd093ed247a9dee4bd2a51a /vncviewer/vncviewer.cxx
parent7f0abbaed390b217627a0536e65f30d3bef90d15 (diff)
downloadtigervnc-adf32175be3b2357d33752750d5b98a34dadb274.tar.gz
tigervnc-adf32175be3b2357d33752750d5b98a34dadb274.zip
Split general FLTK appearance to separate file
These are general things and not specific to TigerVNC, so let's move it to the fltk specific directory for clarity.
Diffstat (limited to 'vncviewer/vncviewer.cxx')
-rw-r--r--vncviewer/vncviewer.cxx26
1 files changed, 3 insertions, 23 deletions
diff --git a/vncviewer/vncviewer.cxx b/vncviewer/vncviewer.cxx
index 13441900..a7e99ffb 100644
--- a/vncviewer/vncviewer.cxx
+++ b/vncviewer/vncviewer.cxx
@@ -60,13 +60,12 @@
#include <network/TcpSocket.h>
#include <os/os.h>
-#include <FL/Fl.H>
-#include <FL/Fl_Widget.H>
#include <FL/Fl_PNG_Image.H>
#include <FL/Fl_Sys_Menu_Bar.H>
#include <FL/fl_ask.H>
#include <FL/x.H>
+#include "fltk/theme.h"
#include "fltk/util.h"
#include "i18n.h"
#include "parameters.h"
@@ -323,18 +322,8 @@ static const char* getlocaledir()
}
static void init_fltk()
{
- // Basic text size (10pt @ 96 dpi => 13px)
- FL_NORMAL_SIZE = 13;
-
- // Select a FLTK scheme and background color that looks somewhat
- // close to modern systems
- Fl::scheme("gtk+");
- Fl::background(220, 220, 220);
-
- // macOS has a slightly brighter default background though
-#ifdef __APPLE__
- Fl::background(240, 240, 240);
-#endif
+ // Adjust look of FLTK
+ init_theme();
// Proper Gnome Shell integration requires that we set a sensible
// WM_CLASS for the window.
@@ -395,21 +384,12 @@ static void init_fltk()
delete icons[i];
#endif
- // This makes the "icon" in dialogs rounded, which fits better
- // with the above schemes.
- fl_message_icon()->box(FL_UP_BOX);
-
// Turn off the annoying behaviour where popups track the mouse.
fl_message_hotspot(false);
// Avoid empty titles for popups
fl_message_title_default(_("TigerVNC Viewer"));
-#ifdef WIN32
- // Most "normal" Windows apps use this font for UI elements.
- Fl::set_font(FL_HELVETICA, "Tahoma");
-#endif
-
// FLTK exposes these so that we can translate them.
fl_no = _("No");
fl_yes = _("Yes");