Initial commit
No files matched your search
@@ -0,0 +1,127 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* rde color scheme helper
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
#include <QColor>
|
||||
|
||||
|
||||
namespace ColorScheme
|
||||
{
|
||||
QString normal() { return QString(); }
|
||||
QString hover() { return QStringLiteral(":hover"); }
|
||||
QString pressed() { return QStringLiteral(":pressed"); }
|
||||
QString checked() { return QStringLiteral(":checked"); }
|
||||
QString disabled() { return QStringLiteral(":disabled"); }
|
||||
QString disabledChecked() { return QStringLiteral(":disabled:checked"); }
|
||||
QString selected() { return QStringLiteral(":selected"); }
|
||||
QString defaulted() { return QStringLiteral(":default "); }
|
||||
QString disabledDefaulted() { return QStringLiteral(":disabled:default "); }
|
||||
QString hoverDefault() { return QStringLiteral(":hover:default "); }
|
||||
|
||||
}
|
||||
|
||||
namespace QToolButtonDefaultColorScheme
|
||||
{
|
||||
QString cssTemplate() { return QStringLiteral("QToolButton%1 { margin: 2px; padding: 3px; border: %2px solid; border-color: qlineargradient(x1: 0.3, y1: 0.4, x2: 1, y2: 1, stop: 0 %3, stop: 1 %6); background-color: qlineargradient(x1: 0.5, y1: 0.6, x2: 1, y2: 1, stop: 0 %4, stop: 1 %7); color: %5; border-radius: 4px;}"); }
|
||||
QString get(const QString &type, const float borderSize, const QColor &borderColor, const QColor &bgColor, const QColor &fgColor)
|
||||
{
|
||||
return cssTemplate().arg(type, QString::number(borderSize), borderColor.name(), bgColor.name(), fgColor.name(), borderColor.lighter(220).name(), bgColor.darker(105).name());
|
||||
}
|
||||
}
|
||||
|
||||
namespace QToolButtonIconOnlyColorScheme
|
||||
{
|
||||
QString cssTemplate() { return QStringLiteral("QToolButton[toolButtonStyle='0']%1 { margin: 0px; padding: 5px; border: %2px solid; border-color: %3; background-color: %4; color: %5; border-radius: 20px; }"); }
|
||||
QString get(const QString &type, const float borderSize, const QColor &borderColor, const QColor &bgColor, const QColor &fgColor) { return cssTemplate().arg(type, QString::number(borderSize), borderColor.name(), bgColor.name(), fgColor.name()); }
|
||||
}
|
||||
|
||||
namespace QScrollBarColorScheme
|
||||
{
|
||||
QString cssTemplate() { return QStringLiteral("QScrollBar:%1%2 { border: 0px; border-radius: 5px; background: %3; }"); }
|
||||
QString get(const QString &type, const QColor &bgColor) { return (cssTemplate().arg(QStringLiteral("horizontal"), type, bgColor.name()) + cssTemplate().arg(QStringLiteral("vertical"), type, bgColor.name())); }
|
||||
}
|
||||
|
||||
namespace QScrollBarHandleColorScheme
|
||||
{
|
||||
QString cssTemplate() { return QStringLiteral("QScrollBar::handle:%1%2 { background: %3; border: 0px; border-radius: 5px; }"); }
|
||||
QString get(const QString &type, const QColor &bgColor) { return (cssTemplate().arg(QStringLiteral("horizontal"), type, bgColor.name()) + cssTemplate().arg(QStringLiteral("vertical"), type, bgColor.name())); }
|
||||
}
|
||||
|
||||
namespace QPushButtonColorScheme
|
||||
{
|
||||
QString cssTemplate() { return QStringLiteral("QPushButton%1 { padding: 4px; border: %5px %6; border-color: %2; border-radius: 2px; color: %3; background-color: %4; outline: none; }"); }
|
||||
QString get(const QString &type, const QColor &borderColor, const QColor &bgColor, const QColor &fgColor, int bordersize = 1, const QString &borderStyle = QStringLiteral("solid")) { return (cssTemplate().arg(type, borderColor.name(), fgColor.name(), bgColor.name(), QString::number(bordersize), borderStyle )); }
|
||||
}
|
||||
|
||||
namespace QTabBarColorScheme
|
||||
{
|
||||
QString cssTemplate() { return QStringLiteral("QTabBar%1 { border: none; background-color: %2; }"); }
|
||||
QString get(const QString &type, const QColor &bgColor) { return (cssTemplate().arg(type, bgColor.name())); }
|
||||
}
|
||||
|
||||
namespace QTabBarTabColorScheme
|
||||
{
|
||||
QString cssTemplate() { return QStringLiteral("QTabBar::tab%1 { border: none; background: %2; color: %3; padding-left: 7px; padding-right: 7px; padding-top: 7px; padding-bottom: 7px; }"); }
|
||||
QString get(const QString &type, const QColor &bgColor, const QColor &fgColor) { return (cssTemplate().arg(type, bgColor.name(), fgColor.name())); }
|
||||
}
|
||||
|
||||
namespace QSecondaryTabBarColorScheme
|
||||
{
|
||||
QString cssTemplate() { return QTabBarColorScheme::cssTemplate().arg(QStringLiteral("[secondary='true']%1")); }
|
||||
QString get(const QString &type, const QColor &bgColor) { return (cssTemplate().arg(type, bgColor.name())); }
|
||||
}
|
||||
|
||||
namespace QSecondaryTabBarTabColorScheme
|
||||
{
|
||||
QString cssTemplate() { return QTabBarTabColorScheme::cssTemplate().arg(QStringLiteral("[secondary='true']%1")); }
|
||||
QString get(const QString &type, const QColor &bgColor, const QColor &fgColor) { return (cssTemplate().arg(type, bgColor.name(), fgColor.name())); }
|
||||
}
|
||||
|
||||
namespace QSplitter
|
||||
{
|
||||
QString cssTemplate() { return QStringLiteral("QSplitter::handle%1 { border: none; background-color: %2; } QSplitter::handle:horizontal%1 { width: %3px; } QSplitter::handle:vertical%1 { height: %3px; }"); }
|
||||
// TODO: no width & height, otherwise tablets cannot scale
|
||||
QString get(const QString &type, const QColor &bgColor, int splitterHandleSize) { return (cssTemplate().arg(type, bgColor.name(), QString::number(splitterHandleSize))); }
|
||||
}
|
||||
|
||||
namespace EditsColorScheme
|
||||
{
|
||||
QString cssTemplate() { return QStringLiteral("QLineEdit%1, QTextEdit%1, QPlainTextEdit%1 { border: 1px solid; border-color: %2; padding: 4px; border-radius: 2px; background-color: %3; color: %4; }"); }
|
||||
QString get(const QString &type, const QColor &border, const QColor &bg, const QColor &fg) { return (cssTemplate().arg(type, border.name(), bg.name(), fg.name())); }
|
||||
}
|
||||
|
||||
|
||||
namespace SearchLineEditColorScheme
|
||||
{
|
||||
QString cssTemplate() { return QStringLiteral("QLineEdit[isSearchLineEdit=true]%1 { border: 0px solid; padding: 1px; background-color: %3; color: %4; }"); }
|
||||
QString get(const QString &type, const QColor &bg, const QColor &fg) { return (cssTemplate().arg(type, bg.name(), fg.name())); }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
|
||||
ADD_SUBDIRECTORY(Light)
|
||||
ADD_SUBDIRECTORY(Dark)
|
||||
|
||||
ADD_SUBDIRECTORY(Test)
|
||||
ADD_SUBDIRECTORY(TabBarTabStyle)
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
#
|
||||
# LightStyle Plugin for Lts Application
|
||||
# $Id$
|
||||
# $HeadURL$
|
||||
# $Author$
|
||||
#
|
||||
# Created by Mike Wille, NLSE, 2018-02-15
|
||||
#
|
||||
|
||||
SET(RmeDarkStylePlugin_SRCS
|
||||
../Base/styles_color_scheme.h
|
||||
rme_dark_style.h
|
||||
rme_dark_style.cpp
|
||||
)
|
||||
|
||||
NGL_ADD_BIG_RESOURCES(RmeDarkStylePlugin_SRCS resources/rme_dark_style.qrc)
|
||||
NGL_ADD_LIBRARY(AAR SV WS RmeDarkStylePlugin SHARED ${RmeDarkStylePlugin_SRCS})
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(RmeDarkStylePlugin
|
||||
PRIVATE
|
||||
Qt5::Core
|
||||
Qt5::Widgets
|
||||
Qt5::Gui
|
||||
StylePluginInterface
|
||||
TabBarTabStyle
|
||||
)
|
||||
|
||||
NGL_INSTALL_TARGET(RmeDarkStylePlugin)
|
||||
|
||||
|
After Width: | Height: | Size: 688 B |
|
After Width: | Height: | Size: 512 B |
|
After Width: | Height: | Size: 527 B |
|
After Width: | Height: | Size: 643 B |
|
After Width: | Height: | Size: 958 B |
|
After Width: | Height: | Size: 372 B |
|
After Width: | Height: | Size: 717 B |
|
After Width: | Height: | Size: 813 B |
|
After Width: | Height: | Size: 597 B |
|
After Width: | Height: | Size: 601 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 726 B |
|
After Width: | Height: | Size: 609 B |
|
After Width: | Height: | Size: 579 B |
|
After Width: | Height: | Size: 611 B |
|
After Width: | Height: | Size: 531 B |
|
After Width: | Height: | Size: 808 B |
|
After Width: | Height: | Size: 619 B |
|
After Width: | Height: | Size: 668 B |
|
After Width: | Height: | Size: 635 B |
|
After Width: | Height: | Size: 839 B |
|
After Width: | Height: | Size: 563 B |
|
After Width: | Height: | Size: 901 B |
|
After Width: | Height: | Size: 540 B |
|
After Width: | Height: | Size: 587 B |
|
After Width: | Height: | Size: 352 B |
|
After Width: | Height: | Size: 679 B |
|
After Width: | Height: | Size: 529 B |
|
After Width: | Height: | Size: 360 B |
|
After Width: | Height: | Size: 465 B |
|
After Width: | Height: | Size: 644 B |
|
After Width: | Height: | Size: 485 B |
|
After Width: | Height: | Size: 368 B |
|
After Width: | Height: | Size: 641 B |
|
After Width: | Height: | Size: 529 B |
|
After Width: | Height: | Size: 813 B |
|
After Width: | Height: | Size: 245 B |
|
After Width: | Height: | Size: 368 B |
|
After Width: | Height: | Size: 866 B |
|
After Width: | Height: | Size: 985 B |
|
After Width: | Height: | Size: 272 B |
|
After Width: | Height: | Size: 230 B |
|
After Width: | Height: | Size: 264 B |
|
After Width: | Height: | Size: 266 B |
|
After Width: | Height: | Size: 822 B |
|
After Width: | Height: | Size: 463 B |
|
After Width: | Height: | Size: 332 B |
|
After Width: | Height: | Size: 392 B |
|
After Width: | Height: | Size: 375 B |
|
After Width: | Height: | Size: 623 B |
|
After Width: | Height: | Size: 935 B |
|
After Width: | Height: | Size: 721 B |
|
After Width: | Height: | Size: 634 B |
|
After Width: | Height: | Size: 672 B |
|
After Width: | Height: | Size: 734 B |
|
After Width: | Height: | Size: 684 B |
|
After Width: | Height: | Size: 680 B |
|
After Width: | Height: | Size: 755 B |
|
After Width: | Height: | Size: 763 B |
|
After Width: | Height: | Size: 695 B |
|
After Width: | Height: | Size: 815 B |
|
After Width: | Height: | Size: 737 B |
|
After Width: | Height: | Size: 934 B |
|
After Width: | Height: | Size: 690 B |
|
After Width: | Height: | Size: 564 B |
|
After Width: | Height: | Size: 707 B |
|
After Width: | Height: | Size: 332 B |
|
After Width: | Height: | Size: 680 B |
|
After Width: | Height: | Size: 472 B |
|
After Width: | Height: | Size: 967 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 502 B |
|
After Width: | Height: | Size: 740 B |
|
After Width: | Height: | Size: 909 B |
|
After Width: | Height: | Size: 918 B |
|
After Width: | Height: | Size: 962 B |
|
After Width: | Height: | Size: 484 B |
|
After Width: | Height: | Size: 501 B |
|
After Width: | Height: | Size: 499 B |
|
After Width: | Height: | Size: 735 B |
|
After Width: | Height: | Size: 505 B |
|
After Width: | Height: | Size: 506 B |
|
After Width: | Height: | Size: 511 B |
|
After Width: | Height: | Size: 506 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 320 B |
|
After Width: | Height: | Size: 348 B |
|
After Width: | Height: | Size: 986 B |
|
After Width: | Height: | Size: 651 B |
|
After Width: | Height: | Size: 796 B |
|
After Width: | Height: | Size: 196 B |
|
After Width: | Height: | Size: 708 B |
|
After Width: | Height: | Size: 835 B |
|
After Width: | Height: | Size: 630 B |
|
After Width: | Height: | Size: 722 B |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 430 B |