Files

79 lines
3.0 KiB
JavaScript
Raw Permalink Normal View History

2022-12-16 19:54:32 +01:00
/*
* This file is part of the Flowee project
2023-02-14 14:56:18 +01:00
* Copyright (C) 2022-2023 Tom Zander <tom@flowee.org>
2022-12-16 19:54:32 +01:00
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
2020-10-14 15:12:33 +02:00
function applySkin(item) {
2021-11-02 19:29:14 +01:00
if (Pay.useDarkSkin)
2020-10-14 15:12:33 +02:00
applyDarkSkin(item);
else
applyLightSkin(item)
}
function applyDarkSkin(item) {
2023-02-14 14:56:18 +01:00
item.palette.window = "#222222" // background of all things.
2025-11-12 00:18:14 +01:00
item.palette.base = "#111111"; // background of text fields, popup-menus
2023-02-14 14:56:18 +01:00
item.palette.alternateBase = "#1d1d1d"; // background of even rows in lists
2025-11-12 00:18:14 +01:00
item.palette.light = "#181818" // background of groupbox, odd rows, pages etc
2023-02-14 14:56:18 +01:00
item.palette.dark = "#bdc3c7" // contrast to the previous one
item.palette.mid = "#4d4d4d" // borders for groupbox, sliders, text-area
item.palette.windowText = "#fcfcfc" // Most text (labels etc)
item.palette.text = "#fcfcfc" // multiline textarea text color.
item.palette.brightText = "#9f9f9f" // popup menu text, less strong text
item.palette.button = "#4d4d4d" // buttons and groupbox borders and slider borders
item.palette.buttonText = "#fcfcfc" // just text for buttons
2025-03-04 11:14:54 +01:00
item.palette.highlight = "#7fa7d6" // mouseover on popup, slider thumb, outline of active textfield, selected-text background
2023-02-14 14:56:18 +01:00
item.palette.highlightedText = "#090909"// selected text
2024-11-29 19:37:10 +01:00
// Tooltips colors are currently unused
2023-02-14 14:56:18 +01:00
item.palette.toolTipBase = "#629c7b" // tooltip background
item.palette.toolTipText = "#000000" // tooltip text and outline
item.palette.shadow = "#90e4b5" // tooltip shadow
// shade of Flowee-green.
item.palette.midlight = "#4f7d63"
// Not currently used
item.palette.link = "#2980b9" // unused
item.palette.linkVisited = "#7f8c8d" // unused
2020-10-14 15:12:33 +02:00
}
function applyLightSkin(item) {
2023-02-14 14:56:18 +01:00
item.palette.window = "#e0dfde";
item.palette.base = "#f0efee";
2023-02-14 14:56:18 +01:00
item.palette.alternateBase = "#e2e1e0";
2025-03-03 19:38:28 +01:00
item.palette.light = "#eae9e8";
2023-02-14 14:56:18 +01:00
item.palette.dark = "#353637";
item.palette.mid = "#bdbdbd";
item.palette.windowText = "#26282a";
2023-02-14 15:03:27 +01:00
item.palette.text = "#26282a";
item.palette.brightText = "#555658";
2021-11-02 19:13:14 +01:00
item.palette.button = "#bfbebd";
2020-10-14 15:12:33 +02:00
item.palette.buttonText = "#26282a";
item.palette.highlight = "#0066ff";
2021-11-03 13:33:49 +01:00
item.palette.highlightedText = "#f9f9f9";
2020-10-14 15:12:33 +02:00
item.palette.toolTipBase = "#ffffff";
item.palette.toolTipText = "#000000";
2024-11-29 19:37:10 +01:00
item.palette.shadow = "#7abd84";
2023-02-14 15:31:18 +01:00
item.palette.midlight = "#5c9e67"
2023-02-14 14:56:18 +01:00
item.palette.link = "#45a7d7";
item.palette.linkVisited = "#7f8c8d";
2020-10-14 15:12:33 +02:00
}