Fixes compiler errors for latest Cygwin versions
This commit is contained in:
parent
97f8d998a7
commit
421314e89a
|
@ -1,5 +1,6 @@
|
|||
2017-01-22 Markus Gans <guru.mail@muenster.de>
|
||||
2017-01-24 Markus Gans <guru.mail@muenster.de>
|
||||
* Fixes compiler errors for latest Cygwin versions
|
||||
* Widget color scheme settings moved to a separate class
|
||||
|
||||
2017-01-21 Markus Gans <guru.mail@muenster.de>
|
||||
* The Final Cut can now also be compiled under Cygwin
|
||||
|
|
|
@ -98,6 +98,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include "final/fvterm.h"
|
||||
#include "final/fwidgetcolors.h"
|
||||
|
||||
|
||||
// Callback macros
|
||||
|
@ -365,97 +366,9 @@ class FWidget : public FVTerm, public FObject
|
|||
virtual void onClose (FCloseEvent*);
|
||||
|
||||
// Data Members
|
||||
static struct widget_colors
|
||||
{
|
||||
short term_fg;
|
||||
short term_bg;
|
||||
short list_fg;
|
||||
short list_bg;
|
||||
short selected_list_fg;
|
||||
short selected_list_bg;
|
||||
short current_element_focus_fg;
|
||||
short current_element_focus_bg;
|
||||
short current_element_fg;
|
||||
short current_element_bg;
|
||||
short current_inc_search_element_fg;
|
||||
short selected_current_element_focus_fg;
|
||||
short selected_current_element_focus_bg;
|
||||
short selected_current_element_fg;
|
||||
short selected_current_element_bg;
|
||||
short label_fg;
|
||||
short label_bg;
|
||||
short label_inactive_fg;
|
||||
short label_inactive_bg;
|
||||
short label_hotkey_fg;
|
||||
short label_hotkey_bg;
|
||||
short label_emphasis_fg;
|
||||
short label_ellipsis_fg;
|
||||
short inputfield_active_focus_fg;
|
||||
short inputfield_active_focus_bg;
|
||||
short inputfield_active_fg;
|
||||
short inputfield_active_bg;
|
||||
short inputfield_inactive_fg;
|
||||
short inputfield_inactive_bg;
|
||||
short dialog_fg;
|
||||
short dialog_resize_fg;
|
||||
short dialog_emphasis_fg;
|
||||
short dialog_bg;
|
||||
short error_box_fg;
|
||||
short error_box_emphasis_fg;
|
||||
short error_box_bg;
|
||||
short tooltip_fg;
|
||||
short tooltip_bg;
|
||||
short shadow_fg;
|
||||
short shadow_bg;
|
||||
short toggle_button_active_focus_fg;
|
||||
short toggle_button_active_focus_bg;
|
||||
short toggle_button_active_fg;
|
||||
short toggle_button_active_bg;
|
||||
short toggle_button_inactive_fg;
|
||||
short toggle_button_inactive_bg;
|
||||
short button_active_focus_fg;
|
||||
short button_active_focus_bg;
|
||||
short button_active_fg;
|
||||
short button_active_bg;
|
||||
short button_inactive_fg;
|
||||
short button_inactive_bg;
|
||||
short button_hotkey_fg;
|
||||
short titlebar_active_fg;
|
||||
short titlebar_active_bg;
|
||||
short titlebar_inactive_fg;
|
||||
short titlebar_inactive_bg;
|
||||
short titlebar_button_fg;
|
||||
short titlebar_button_bg;
|
||||
short titlebar_button_focus_fg;
|
||||
short titlebar_button_focus_bg;
|
||||
short menu_active_focus_fg;
|
||||
short menu_active_focus_bg;
|
||||
short menu_active_fg;
|
||||
short menu_active_bg;
|
||||
short menu_inactive_fg;
|
||||
short menu_inactive_bg;
|
||||
short menu_hotkey_fg;
|
||||
short menu_hotkey_bg;
|
||||
short statusbar_fg;
|
||||
short statusbar_bg;
|
||||
short statusbar_hotkey_fg;
|
||||
short statusbar_hotkey_bg;
|
||||
short statusbar_separator_fg;
|
||||
short statusbar_active_fg;
|
||||
short statusbar_active_bg;
|
||||
short statusbar_active_hotkey_fg;
|
||||
short statusbar_active_hotkey_bg;
|
||||
short scrollbar_fg;
|
||||
short scrollbar_bg;
|
||||
short scrollbar_button_fg;
|
||||
short scrollbar_button_bg;
|
||||
short progressbar_fg;
|
||||
short progressbar_bg;
|
||||
} wc;
|
||||
// widget_colors wc;
|
||||
|
||||
int flags;
|
||||
static uInt modal_dialogs;
|
||||
static FWidgetColors wc;
|
||||
static widgetList* dialog_list;
|
||||
static widgetList* always_on_top_list;
|
||||
static widgetList* close_widget;
|
||||
|
|
|
@ -0,0 +1,140 @@
|
|||
/***********************************************************************
|
||||
* fwidgetcolors.h - Set widget color theme *
|
||||
* *
|
||||
* This file is part of the Final Cut widget toolkit *
|
||||
* *
|
||||
* Copyright 2018 Markus Gans *
|
||||
* *
|
||||
* The Final Cut is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public License *
|
||||
* as published by the Free Software Foundation; either version 3 of *
|
||||
* the License, or (at your option) any later version. *
|
||||
* *
|
||||
* The Final Cut is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program. If not, see *
|
||||
* <http://www.gnu.org/licenses/>. *
|
||||
***********************************************************************/
|
||||
|
||||
/* Standalone class
|
||||
* ════════════════
|
||||
*
|
||||
* ▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏
|
||||
* ▕ FWidgetColors ▏
|
||||
* ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏
|
||||
*/
|
||||
|
||||
#ifndef FWIDGETCOLORS_H
|
||||
#define FWIDGETCOLORS_H
|
||||
|
||||
#include "final/fc.h"
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// class FWidgetColors
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
|
||||
class FWidgetColors
|
||||
{
|
||||
public:
|
||||
// Methods
|
||||
void set8ColorTheme();
|
||||
void set16ColorTheme();
|
||||
|
||||
// Data Members
|
||||
short term_fg;
|
||||
short term_bg;
|
||||
short list_fg;
|
||||
short list_bg;
|
||||
short selected_list_fg;
|
||||
short selected_list_bg;
|
||||
short current_element_focus_fg;
|
||||
short current_element_focus_bg;
|
||||
short current_element_fg;
|
||||
short current_element_bg;
|
||||
short current_inc_search_element_fg;
|
||||
short selected_current_element_focus_fg;
|
||||
short selected_current_element_focus_bg;
|
||||
short selected_current_element_fg;
|
||||
short selected_current_element_bg;
|
||||
short label_fg;
|
||||
short label_bg;
|
||||
short label_inactive_fg;
|
||||
short label_inactive_bg;
|
||||
short label_hotkey_fg;
|
||||
short label_hotkey_bg;
|
||||
short label_emphasis_fg;
|
||||
short label_ellipsis_fg;
|
||||
short inputfield_active_focus_fg;
|
||||
short inputfield_active_focus_bg;
|
||||
short inputfield_active_fg;
|
||||
short inputfield_active_bg;
|
||||
short inputfield_inactive_fg;
|
||||
short inputfield_inactive_bg;
|
||||
short dialog_fg;
|
||||
short dialog_resize_fg;
|
||||
short dialog_emphasis_fg;
|
||||
short dialog_bg;
|
||||
short error_box_fg;
|
||||
short error_box_emphasis_fg;
|
||||
short error_box_bg;
|
||||
short tooltip_fg;
|
||||
short tooltip_bg;
|
||||
short shadow_fg;
|
||||
short shadow_bg;
|
||||
short toggle_button_active_focus_fg;
|
||||
short toggle_button_active_focus_bg;
|
||||
short toggle_button_active_fg;
|
||||
short toggle_button_active_bg;
|
||||
short toggle_button_inactive_fg;
|
||||
short toggle_button_inactive_bg;
|
||||
short button_active_focus_fg;
|
||||
short button_active_focus_bg;
|
||||
short button_active_fg;
|
||||
short button_active_bg;
|
||||
short button_inactive_fg;
|
||||
short button_inactive_bg;
|
||||
short button_hotkey_fg;
|
||||
short titlebar_active_fg;
|
||||
short titlebar_active_bg;
|
||||
short titlebar_inactive_fg;
|
||||
short titlebar_inactive_bg;
|
||||
short titlebar_button_fg;
|
||||
short titlebar_button_bg;
|
||||
short titlebar_button_focus_fg;
|
||||
short titlebar_button_focus_bg;
|
||||
short menu_active_focus_fg;
|
||||
short menu_active_focus_bg;
|
||||
short menu_active_fg;
|
||||
short menu_active_bg;
|
||||
short menu_inactive_fg;
|
||||
short menu_inactive_bg;
|
||||
short menu_hotkey_fg;
|
||||
short menu_hotkey_bg;
|
||||
short statusbar_fg;
|
||||
short statusbar_bg;
|
||||
short statusbar_hotkey_fg;
|
||||
short statusbar_hotkey_bg;
|
||||
short statusbar_separator_fg;
|
||||
short statusbar_active_fg;
|
||||
short statusbar_active_bg;
|
||||
short statusbar_active_hotkey_fg;
|
||||
short statusbar_active_hotkey_bg;
|
||||
short scrollbar_fg;
|
||||
short scrollbar_bg;
|
||||
short scrollbar_button_fg;
|
||||
short scrollbar_button_bg;
|
||||
short progressbar_fg;
|
||||
short progressbar_bg;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
|
||||
#endif // FWIDGETCOLORS_H
|
|
@ -45,6 +45,7 @@ libfinal_la_SOURCES = \
|
|||
foptimove.cpp \
|
||||
ftermbuffer.cpp \
|
||||
fapplication.cpp \
|
||||
fwidgetcolors.cpp \
|
||||
fwidget.cpp \
|
||||
fobject.cpp
|
||||
|
||||
|
@ -99,6 +100,7 @@ finalcutinclude_HEADERS = \
|
|||
../include/final/fvterm.h \
|
||||
../include/final/ftextview.h \
|
||||
../include/final/ftogglebutton.h \
|
||||
../include/final/fwidgetcolors.h \
|
||||
../include/final/fwidget.h \
|
||||
../include/final/fwindow.h
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ INCLUDE_HEADERS = \
|
|||
fvterm.h \
|
||||
ftextview.h \
|
||||
ftogglebutton.h \
|
||||
fwidgetcolors.h \
|
||||
fwidget.h \
|
||||
fwindow.h
|
||||
|
||||
|
@ -99,6 +100,7 @@ OBJS = \
|
|||
foptimove.o \
|
||||
ftermbuffer.o \
|
||||
fapplication.o \
|
||||
fwidgetcolors.o \
|
||||
fwidget.o \
|
||||
fobject.o
|
||||
|
||||
|
|
|
@ -47,6 +47,7 @@ INCLUDE_HEADERS = \
|
|||
fvterm.h \
|
||||
ftextview.h \
|
||||
ftogglebutton.h \
|
||||
fwidgetcolors.h \
|
||||
fwidget.h \
|
||||
fwindow.h
|
||||
|
||||
|
@ -99,6 +100,7 @@ OBJS = \
|
|||
foptimove.o \
|
||||
ftermbuffer.o \
|
||||
fapplication.o \
|
||||
fwidgetcolors.o \
|
||||
fwidget.o \
|
||||
fobject.o
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ am_libfinal_la_OBJECTS = fstring.lo fpoint.lo frect.lo fscrollbar.lo \
|
|||
fwindow.lo fmessagebox.lo ftooltip.lo ffiledialog.lo \
|
||||
ftextview.lo fstatusbar.lo fterm.lo fvterm.lo fevent.lo \
|
||||
foptiattr.lo foptimove.lo ftermbuffer.lo fapplication.lo \
|
||||
fwidget.lo fobject.lo
|
||||
fwidgetcolors.lo fwidget.lo fobject.lo
|
||||
libfinal_la_OBJECTS = $(am_libfinal_la_OBJECTS)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
|
@ -372,6 +372,7 @@ libfinal_la_SOURCES = \
|
|||
foptimove.cpp \
|
||||
ftermbuffer.cpp \
|
||||
fapplication.cpp \
|
||||
fwidgetcolors.cpp \
|
||||
fwidget.cpp \
|
||||
fobject.cpp
|
||||
|
||||
|
@ -424,6 +425,7 @@ finalcutinclude_HEADERS = \
|
|||
../include/final/fvterm.h \
|
||||
../include/final/ftextview.h \
|
||||
../include/final/ftogglebutton.h \
|
||||
../include/final/fwidgetcolors.h \
|
||||
../include/final/fwidget.h \
|
||||
../include/final/fwindow.h
|
||||
|
||||
|
@ -545,6 +547,7 @@ distclean-compile:
|
|||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftooltip.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fvterm.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fwidget.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fwidgetcolors.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fwindow.Plo@am__quote@
|
||||
|
||||
.cpp.o:
|
||||
|
|
|
@ -1298,7 +1298,7 @@ void FTerm::resetColorMap()
|
|||
//----------------------------------------------------------------------
|
||||
void FTerm::setPalette (short index, int r, int g, int b)
|
||||
{
|
||||
// Redefine the color palette
|
||||
// Redefine RGB color value for a palette entry
|
||||
|
||||
char*& Ic = TCAP(fc::t_initialize_color);
|
||||
char*& Ip = TCAP(fc::t_initialize_pair);
|
||||
|
@ -4215,6 +4215,8 @@ void FTerm::init_encoding()
|
|||
//----------------------------------------------------------------------
|
||||
void FTerm::redefineColorPalette()
|
||||
{
|
||||
// Redefine the color palette
|
||||
|
||||
if ( cygwin_terminal
|
||||
|| kde_konsole
|
||||
|| tera_terminal
|
||||
|
|
185
src/fwidget.cpp
185
src/fwidget.cpp
|
@ -42,7 +42,7 @@ FWidget::widgetList* FWidget::window_list = 0;
|
|||
FWidget::widgetList* FWidget::dialog_list = 0;
|
||||
FWidget::widgetList* FWidget::always_on_top_list = 0;
|
||||
FWidget::widgetList* FWidget::close_widget = 0;
|
||||
FWidget::widget_colors FWidget::wc;
|
||||
FWidgetColors FWidget::wc;
|
||||
bool FWidget::init_desktop;
|
||||
bool FWidget::hideable;
|
||||
|
||||
|
@ -2251,6 +2251,7 @@ void FWidget::init()
|
|||
// Initialize default widget colors
|
||||
setColorTheme();
|
||||
|
||||
// Default foreground and background color of the desktop/terminal
|
||||
foreground_color = wc.term_fg;
|
||||
background_color = wc.term_bg;
|
||||
init_desktop = false;
|
||||
|
@ -2488,191 +2489,13 @@ void FWidget::setColorTheme()
|
|||
{
|
||||
if ( getMaxColor() < 16 ) // for 8 color mode
|
||||
{
|
||||
set8ColorTheme();
|
||||
wc.set8ColorTheme();
|
||||
}
|
||||
else
|
||||
{
|
||||
set16ColorTheme();
|
||||
wc.set16ColorTheme();
|
||||
|
||||
if ( isKdeTerminal() )
|
||||
wc.term_bg = fc::SteelBlue3;
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::set8ColorTheme()
|
||||
{
|
||||
wc.term_fg = fc::Black;
|
||||
wc.term_bg = fc::Blue;
|
||||
wc.list_fg = fc::Black;
|
||||
wc.list_bg = fc::LightGray;
|
||||
wc.selected_list_fg = fc::Blue;
|
||||
wc.selected_list_bg = fc::LightGray;
|
||||
wc.dialog_fg = fc::Black;
|
||||
wc.dialog_resize_fg = fc::Red;
|
||||
wc.dialog_emphasis_fg = fc::Blue;
|
||||
wc.dialog_bg = fc::LightGray;
|
||||
wc.error_box_fg = fc::Black;
|
||||
wc.error_box_emphasis_fg = fc::Red;
|
||||
wc.error_box_bg = fc::LightGray;
|
||||
wc.tooltip_fg = fc::LightGray;
|
||||
wc.tooltip_bg = fc::Cyan;
|
||||
wc.shadow_fg = fc::Black;
|
||||
wc.shadow_bg = fc::LightGray; // only for transparent shadow
|
||||
wc.current_element_focus_fg = fc::LightGray;
|
||||
wc.current_element_focus_bg = fc::Red;
|
||||
wc.current_element_fg = fc::LightGray;
|
||||
wc.current_element_bg = fc::Blue;
|
||||
wc.current_inc_search_element_fg = fc::Brown;
|
||||
wc.selected_current_element_focus_fg = fc::Blue;
|
||||
wc.selected_current_element_focus_bg = fc::Red;
|
||||
wc.selected_current_element_fg = fc::Cyan;
|
||||
wc.selected_current_element_bg = fc::Blue;
|
||||
wc.label_fg = fc::Black;
|
||||
wc.label_bg = fc::LightGray;
|
||||
wc.label_inactive_fg = fc::Cyan;
|
||||
wc.label_inactive_bg = fc::LightGray;
|
||||
wc.label_hotkey_fg = fc::Red;
|
||||
wc.label_hotkey_bg = fc::LightGray;
|
||||
wc.label_emphasis_fg = fc::Blue;
|
||||
wc.label_ellipsis_fg = fc::Black;
|
||||
wc.inputfield_active_focus_fg = fc::LightGray;
|
||||
wc.inputfield_active_focus_bg = fc::Blue;
|
||||
wc.inputfield_active_fg = fc::Black;
|
||||
wc.inputfield_active_bg = fc::Cyan;
|
||||
wc.inputfield_inactive_fg = fc::Black;
|
||||
wc.inputfield_inactive_bg = fc::LightGray;
|
||||
wc.toggle_button_active_focus_fg = fc::LightGray;
|
||||
wc.toggle_button_active_focus_bg = fc::Red;
|
||||
wc.toggle_button_active_fg = fc::Black;
|
||||
wc.toggle_button_active_bg = fc::LightGray;
|
||||
wc.toggle_button_inactive_fg = fc::Cyan;
|
||||
wc.toggle_button_inactive_bg = fc::LightGray;
|
||||
wc.button_active_focus_fg = fc::LightGray;
|
||||
wc.button_active_focus_bg = fc::Red;
|
||||
wc.button_active_fg = fc::LightGray;
|
||||
wc.button_active_bg = fc::Blue;
|
||||
wc.button_inactive_fg = fc::Black;
|
||||
wc.button_inactive_bg = fc::Blue;
|
||||
wc.button_hotkey_fg = fc::LightGray;
|
||||
wc.titlebar_active_fg = fc::LightGray;
|
||||
wc.titlebar_active_bg = fc::Red;
|
||||
wc.titlebar_inactive_fg = fc::Black;
|
||||
wc.titlebar_inactive_bg = fc::LightGray;
|
||||
wc.titlebar_button_fg = fc::Black;
|
||||
wc.titlebar_button_bg = fc::LightGray;
|
||||
wc.titlebar_button_focus_fg = fc::LightGray;
|
||||
wc.titlebar_button_focus_bg = fc::Black;
|
||||
wc.menu_active_focus_fg = fc::LightGray;
|
||||
wc.menu_active_focus_bg = fc::Blue;
|
||||
wc.menu_active_fg = fc::Black;
|
||||
wc.menu_active_bg = fc::LightGray;
|
||||
wc.menu_inactive_fg = fc::Cyan;
|
||||
wc.menu_inactive_bg = fc::LightGray;
|
||||
wc.menu_hotkey_fg = fc::Red;
|
||||
wc.menu_hotkey_bg = fc::LightGray;
|
||||
wc.statusbar_fg = fc::Black;
|
||||
wc.statusbar_bg = fc::LightGray;
|
||||
wc.statusbar_hotkey_fg = fc::Red;
|
||||
wc.statusbar_hotkey_bg = fc::LightGray;
|
||||
wc.statusbar_separator_fg = fc::Black;
|
||||
wc.statusbar_active_fg = fc::LightGray;
|
||||
wc.statusbar_active_bg = fc::Black;
|
||||
wc.statusbar_active_hotkey_fg = fc::Red;
|
||||
wc.statusbar_active_hotkey_bg = fc::Black;
|
||||
wc.scrollbar_fg = fc::Black;
|
||||
wc.scrollbar_bg = fc::LightGray;
|
||||
wc.scrollbar_button_fg = fc::Black;
|
||||
wc.scrollbar_button_bg = fc::LightGray;
|
||||
wc.progressbar_fg = fc::Blue;
|
||||
wc.progressbar_bg = fc::LightGray;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::set16ColorTheme()
|
||||
{
|
||||
wc.term_fg = fc::Black;
|
||||
wc.term_bg = fc::LightBlue;
|
||||
wc.list_fg = fc::Black;
|
||||
wc.list_bg = fc::White;
|
||||
wc.selected_list_fg = fc::Cyan;
|
||||
wc.selected_list_bg = fc::White;
|
||||
wc.dialog_fg = fc::Black;
|
||||
wc.dialog_resize_fg = fc::Cyan;
|
||||
wc.dialog_emphasis_fg = fc::Blue;
|
||||
wc.dialog_bg = fc::White;
|
||||
wc.error_box_fg = fc::White;
|
||||
wc.error_box_emphasis_fg = fc::Yellow;
|
||||
wc.error_box_bg = fc::LightRed;
|
||||
wc.tooltip_fg = fc::Black;
|
||||
wc.tooltip_bg = fc::Yellow;
|
||||
wc.shadow_fg = fc::Black;
|
||||
wc.shadow_bg = fc::LightGray; // only for transparent shadow
|
||||
wc.current_element_focus_fg = fc::White;
|
||||
wc.current_element_focus_bg = fc::Blue;
|
||||
wc.current_element_fg = fc::LightGray;
|
||||
wc.current_element_bg = fc::Blue;
|
||||
wc.current_inc_search_element_fg = fc::LightRed;
|
||||
wc.selected_current_element_focus_fg = fc::LightCyan;
|
||||
wc.selected_current_element_focus_bg = fc::Blue;
|
||||
wc.selected_current_element_fg = fc::LightBlue;
|
||||
wc.selected_current_element_bg = fc::Blue;
|
||||
wc.label_fg = fc::Black;
|
||||
wc.label_bg = fc::White;
|
||||
wc.label_inactive_fg = fc::LightGray;
|
||||
wc.label_inactive_bg = fc::White;
|
||||
wc.label_hotkey_fg = fc::Red;
|
||||
wc.label_hotkey_bg = fc::White;
|
||||
wc.label_emphasis_fg = fc::Blue;
|
||||
wc.label_ellipsis_fg = fc::DarkGray;
|
||||
wc.inputfield_active_focus_fg = fc::White;
|
||||
wc.inputfield_active_focus_bg = fc::Cyan;
|
||||
wc.inputfield_active_fg = fc::Black;
|
||||
wc.inputfield_active_bg = fc::LightGray;
|
||||
wc.inputfield_inactive_fg = fc::DarkGray;
|
||||
wc.inputfield_inactive_bg = fc::LightGray;
|
||||
wc.toggle_button_active_focus_fg = fc::White;
|
||||
wc.toggle_button_active_focus_bg = fc::Cyan;
|
||||
wc.toggle_button_active_fg = fc::Black;
|
||||
wc.toggle_button_active_bg = fc::White;
|
||||
wc.toggle_button_inactive_fg = fc::LightGray;
|
||||
wc.toggle_button_inactive_bg = fc::White;
|
||||
wc.button_active_focus_fg = fc::LightGray;
|
||||
wc.button_active_focus_bg = fc::Blue;
|
||||
wc.button_active_fg = fc::LightGray;
|
||||
wc.button_active_bg = fc::DarkGray;
|
||||
wc.button_inactive_fg = fc::DarkGray;
|
||||
wc.button_inactive_bg = fc::LightGray;
|
||||
wc.button_hotkey_fg = fc::White;
|
||||
wc.titlebar_active_fg = fc::White;
|
||||
wc.titlebar_active_bg = fc::Blue;
|
||||
wc.titlebar_inactive_fg = fc::LightGray;
|
||||
wc.titlebar_inactive_bg = fc::DarkGray;
|
||||
wc.titlebar_button_fg = fc::DarkGray;
|
||||
wc.titlebar_button_bg = fc::LightGray;
|
||||
wc.titlebar_button_focus_fg = fc::LightGray;
|
||||
wc.titlebar_button_focus_bg = fc::Black;
|
||||
wc.menu_active_focus_fg = fc::White;
|
||||
wc.menu_active_focus_bg = fc::Blue;
|
||||
wc.menu_active_fg = fc::Black;
|
||||
wc.menu_active_bg = fc::White;
|
||||
wc.menu_inactive_fg = fc::LightGray;
|
||||
wc.menu_inactive_bg = fc::White;
|
||||
wc.menu_hotkey_fg = fc::Red;
|
||||
wc.menu_hotkey_bg = fc::White;
|
||||
wc.statusbar_fg = fc::White;
|
||||
wc.statusbar_bg = fc::Blue;
|
||||
wc.statusbar_hotkey_fg = fc::LightRed;
|
||||
wc.statusbar_hotkey_bg = fc::Blue;
|
||||
wc.statusbar_separator_fg = fc::Black;
|
||||
wc.statusbar_active_fg = fc::Blue;
|
||||
wc.statusbar_active_bg = fc::White;
|
||||
wc.statusbar_active_hotkey_fg = fc::DarkGray;
|
||||
wc.statusbar_active_hotkey_bg = fc::White;
|
||||
wc.scrollbar_fg = fc::DarkGray;
|
||||
wc.scrollbar_bg = fc::LightBlue;
|
||||
wc.scrollbar_button_fg = fc::Black;
|
||||
wc.scrollbar_button_bg = fc::LightGray;
|
||||
wc.progressbar_fg = fc::DarkGray;
|
||||
wc.progressbar_bg = fc::LightBlue;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,208 @@
|
|||
/***********************************************************************
|
||||
* fwidgetcolors.cpp - Set widget color theme *
|
||||
* *
|
||||
* This file is part of the Final Cut widget toolkit *
|
||||
* *
|
||||
* Copyright 2018 Markus Gans *
|
||||
* *
|
||||
* The Final Cut is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Lesser General Public License *
|
||||
* as published by the Free Software Foundation; either version 3 of *
|
||||
* the License, or (at your option) any later version. *
|
||||
* *
|
||||
* The Final Cut is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with this program. If not, see *
|
||||
* <http://www.gnu.org/licenses/>. *
|
||||
***********************************************************************/
|
||||
|
||||
#include "final/fwidgetcolors.h"
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// class FWidgetColors
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// public methods of FWidgetColors
|
||||
//----------------------------------------------------------------------
|
||||
void FWidgetColors::set8ColorTheme()
|
||||
{
|
||||
term_fg = fc::Black;
|
||||
term_bg = fc::Blue;
|
||||
list_fg = fc::Black;
|
||||
list_bg = fc::LightGray;
|
||||
selected_list_fg = fc::Blue;
|
||||
selected_list_bg = fc::LightGray;
|
||||
dialog_fg = fc::Black;
|
||||
dialog_resize_fg = fc::Red;
|
||||
dialog_emphasis_fg = fc::Blue;
|
||||
dialog_bg = fc::LightGray;
|
||||
error_box_fg = fc::Black;
|
||||
error_box_emphasis_fg = fc::Red;
|
||||
error_box_bg = fc::LightGray;
|
||||
tooltip_fg = fc::LightGray;
|
||||
tooltip_bg = fc::Cyan;
|
||||
shadow_fg = fc::Black;
|
||||
shadow_bg = fc::LightGray; // only for transparent shadow
|
||||
current_element_focus_fg = fc::LightGray;
|
||||
current_element_focus_bg = fc::Red;
|
||||
current_element_fg = fc::LightGray;
|
||||
current_element_bg = fc::Blue;
|
||||
current_inc_search_element_fg = fc::Brown;
|
||||
selected_current_element_focus_fg = fc::Blue;
|
||||
selected_current_element_focus_bg = fc::Red;
|
||||
selected_current_element_fg = fc::Cyan;
|
||||
selected_current_element_bg = fc::Blue;
|
||||
label_fg = fc::Black;
|
||||
label_bg = fc::LightGray;
|
||||
label_inactive_fg = fc::Cyan;
|
||||
label_inactive_bg = fc::LightGray;
|
||||
label_hotkey_fg = fc::Red;
|
||||
label_hotkey_bg = fc::LightGray;
|
||||
label_emphasis_fg = fc::Blue;
|
||||
label_ellipsis_fg = fc::Black;
|
||||
inputfield_active_focus_fg = fc::LightGray;
|
||||
inputfield_active_focus_bg = fc::Blue;
|
||||
inputfield_active_fg = fc::Black;
|
||||
inputfield_active_bg = fc::Cyan;
|
||||
inputfield_inactive_fg = fc::Black;
|
||||
inputfield_inactive_bg = fc::LightGray;
|
||||
toggle_button_active_focus_fg = fc::LightGray;
|
||||
toggle_button_active_focus_bg = fc::Red;
|
||||
toggle_button_active_fg = fc::Black;
|
||||
toggle_button_active_bg = fc::LightGray;
|
||||
toggle_button_inactive_fg = fc::Cyan;
|
||||
toggle_button_inactive_bg = fc::LightGray;
|
||||
button_active_focus_fg = fc::LightGray;
|
||||
button_active_focus_bg = fc::Red;
|
||||
button_active_fg = fc::LightGray;
|
||||
button_active_bg = fc::Blue;
|
||||
button_inactive_fg = fc::Black;
|
||||
button_inactive_bg = fc::Blue;
|
||||
button_hotkey_fg = fc::LightGray;
|
||||
titlebar_active_fg = fc::LightGray;
|
||||
titlebar_active_bg = fc::Red;
|
||||
titlebar_inactive_fg = fc::Black;
|
||||
titlebar_inactive_bg = fc::LightGray;
|
||||
titlebar_button_fg = fc::Black;
|
||||
titlebar_button_bg = fc::LightGray;
|
||||
titlebar_button_focus_fg = fc::LightGray;
|
||||
titlebar_button_focus_bg = fc::Black;
|
||||
menu_active_focus_fg = fc::LightGray;
|
||||
menu_active_focus_bg = fc::Blue;
|
||||
menu_active_fg = fc::Black;
|
||||
menu_active_bg = fc::LightGray;
|
||||
menu_inactive_fg = fc::Cyan;
|
||||
menu_inactive_bg = fc::LightGray;
|
||||
menu_hotkey_fg = fc::Red;
|
||||
menu_hotkey_bg = fc::LightGray;
|
||||
statusbar_fg = fc::Black;
|
||||
statusbar_bg = fc::LightGray;
|
||||
statusbar_hotkey_fg = fc::Red;
|
||||
statusbar_hotkey_bg = fc::LightGray;
|
||||
statusbar_separator_fg = fc::Black;
|
||||
statusbar_active_fg = fc::LightGray;
|
||||
statusbar_active_bg = fc::Black;
|
||||
statusbar_active_hotkey_fg = fc::Red;
|
||||
statusbar_active_hotkey_bg = fc::Black;
|
||||
scrollbar_fg = fc::Black;
|
||||
scrollbar_bg = fc::LightGray;
|
||||
scrollbar_button_fg = fc::Black;
|
||||
scrollbar_button_bg = fc::LightGray;
|
||||
progressbar_fg = fc::Blue;
|
||||
progressbar_bg = fc::LightGray;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidgetColors::set16ColorTheme()
|
||||
{
|
||||
term_fg = fc::Black;
|
||||
term_bg = fc::LightBlue;
|
||||
list_fg = fc::Black;
|
||||
list_bg = fc::White;
|
||||
selected_list_fg = fc::Cyan;
|
||||
selected_list_bg = fc::White;
|
||||
dialog_fg = fc::Black;
|
||||
dialog_resize_fg = fc::Cyan;
|
||||
dialog_emphasis_fg = fc::Blue;
|
||||
dialog_bg = fc::White;
|
||||
error_box_fg = fc::White;
|
||||
error_box_emphasis_fg = fc::Yellow;
|
||||
error_box_bg = fc::LightRed;
|
||||
tooltip_fg = fc::Black;
|
||||
tooltip_bg = fc::Yellow;
|
||||
shadow_fg = fc::Black;
|
||||
shadow_bg = fc::LightGray; // only for transparent shadow
|
||||
current_element_focus_fg = fc::White;
|
||||
current_element_focus_bg = fc::Blue;
|
||||
current_element_fg = fc::LightGray;
|
||||
current_element_bg = fc::Blue;
|
||||
current_inc_search_element_fg = fc::LightRed;
|
||||
selected_current_element_focus_fg = fc::LightCyan;
|
||||
selected_current_element_focus_bg = fc::Blue;
|
||||
selected_current_element_fg = fc::LightBlue;
|
||||
selected_current_element_bg = fc::Blue;
|
||||
label_fg = fc::Black;
|
||||
label_bg = fc::White;
|
||||
label_inactive_fg = fc::LightGray;
|
||||
label_inactive_bg = fc::White;
|
||||
label_hotkey_fg = fc::Red;
|
||||
label_hotkey_bg = fc::White;
|
||||
label_emphasis_fg = fc::Blue;
|
||||
label_ellipsis_fg = fc::DarkGray;
|
||||
inputfield_active_focus_fg = fc::White;
|
||||
inputfield_active_focus_bg = fc::Cyan;
|
||||
inputfield_active_fg = fc::Black;
|
||||
inputfield_active_bg = fc::LightGray;
|
||||
inputfield_inactive_fg = fc::DarkGray;
|
||||
inputfield_inactive_bg = fc::LightGray;
|
||||
toggle_button_active_focus_fg = fc::White;
|
||||
toggle_button_active_focus_bg = fc::Cyan;
|
||||
toggle_button_active_fg = fc::Black;
|
||||
toggle_button_active_bg = fc::White;
|
||||
toggle_button_inactive_fg = fc::LightGray;
|
||||
toggle_button_inactive_bg = fc::White;
|
||||
button_active_focus_fg = fc::LightGray;
|
||||
button_active_focus_bg = fc::Blue;
|
||||
button_active_fg = fc::LightGray;
|
||||
button_active_bg = fc::DarkGray;
|
||||
button_inactive_fg = fc::DarkGray;
|
||||
button_inactive_bg = fc::LightGray;
|
||||
button_hotkey_fg = fc::White;
|
||||
titlebar_active_fg = fc::White;
|
||||
titlebar_active_bg = fc::Blue;
|
||||
titlebar_inactive_fg = fc::LightGray;
|
||||
titlebar_inactive_bg = fc::DarkGray;
|
||||
titlebar_button_fg = fc::DarkGray;
|
||||
titlebar_button_bg = fc::LightGray;
|
||||
titlebar_button_focus_fg = fc::LightGray;
|
||||
titlebar_button_focus_bg = fc::Black;
|
||||
menu_active_focus_fg = fc::White;
|
||||
menu_active_focus_bg = fc::Blue;
|
||||
menu_active_fg = fc::Black;
|
||||
menu_active_bg = fc::White;
|
||||
menu_inactive_fg = fc::LightGray;
|
||||
menu_inactive_bg = fc::White;
|
||||
menu_hotkey_fg = fc::Red;
|
||||
menu_hotkey_bg = fc::White;
|
||||
statusbar_fg = fc::White;
|
||||
statusbar_bg = fc::Blue;
|
||||
statusbar_hotkey_fg = fc::LightRed;
|
||||
statusbar_hotkey_bg = fc::Blue;
|
||||
statusbar_separator_fg = fc::Black;
|
||||
statusbar_active_fg = fc::Blue;
|
||||
statusbar_active_bg = fc::White;
|
||||
statusbar_active_hotkey_fg = fc::DarkGray;
|
||||
statusbar_active_hotkey_bg = fc::White;
|
||||
scrollbar_fg = fc::DarkGray;
|
||||
scrollbar_bg = fc::LightBlue;
|
||||
scrollbar_button_fg = fc::Black;
|
||||
scrollbar_button_bg = fc::LightGray;
|
||||
progressbar_fg = fc::DarkGray;
|
||||
progressbar_bg = fc::LightBlue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue