Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/server/src/theme/colors.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ enum SemanticColor : std::uint8_t {
MainWindowBorder,
MainWindowOuterBorder,
SettingsWindowBorder,
MainWindowShadowColor,

StatusBarBackground,

Expand Down
2 changes: 2 additions & 0 deletions src/server/src/theme/theme-file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ QColor ThemeFile::deriveSemantic(SemanticColor color) const {
}
case SemanticColor::MainWindowOuterBorder:
return QColor::fromRgbF(0, 0, 0, isLight() ? 0.15f : 0.5f);
case SemanticColor::MainWindowShadowColor:
return QColor::fromRgbF(0, 0, 0, 0.3f);
case SemanticColor::SettingsWindowBorder:
return resolve(SemanticColor::MainWindowBorder);
case SemanticColor::StatusBarBackground:
Expand Down
1 change: 1 addition & 0 deletions src/server/src/theme/theme-parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ static const std::vector<std::pair<std::string, SemanticColor>> RECOGNIZED_KEYS
{"shortcut.border", SemanticColor::ShortcutIndicatorBorder},

{"main_window.border", SemanticColor::MainWindowBorder},
{"main_window.shadow", SemanticColor::MainWindowShadowColor},
{"main_window.outer_border", SemanticColor::MainWindowOuterBorder},
{"main_window.footer.background", SemanticColor::StatusBarBackground},
{"settings_window.border", SemanticColor::SettingsWindowBorder},
Expand Down
2 changes: 2 additions & 0 deletions src/server/src/ui/bridges/theme-bridge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class ThemeBridge : public QObject {
Q_PROPERTY(QColor loadingBar READ loadingBar NOTIFY changed)
Q_PROPERTY(QColor buttonPrimaryBg READ buttonPrimaryBg NOTIFY changed)
Q_PROPERTY(QColor buttonPrimaryHoverBg READ buttonPrimaryHoverBg NOTIFY changed)
Q_PROPERTY(QColor csdShadowColor READ csdShadowColor NOTIFY changed)
Q_PROPERTY(qreal surfaceOpacity READ surfaceOpacity CONSTANT)
Q_PROPERTY(qreal regularFontSize READ regularFontSize NOTIFY changed)
Q_PROPERTY(qreal smallerFontSize READ smallerFontSize NOTIFY changed)
Expand Down Expand Up @@ -115,6 +116,7 @@ class ThemeBridge : public QObject {
QColor loadingBar() const { return resolve(SemanticColor::LoadingBar); }
QColor buttonPrimaryBg() const { return resolve(SemanticColor::ButtonPrimaryBackground); }
QColor buttonPrimaryHoverBg() const { return resolve(SemanticColor::ButtonPrimaryHoverBackground); }
QColor csdShadowColor() const { return resolve(SemanticColor::MainWindowShadowColor); }

static constexpr qreal surfaceOpacity() { return 0.6; }
qreal regularFontSize() const { return ThemeService::instance().pointSize(TextRegular); }
Expand Down
3 changes: 2 additions & 1 deletion src/server/src/ui/qml/launcher/LauncherWindow.qml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ LauncherWindowBase {
property int cornerRadius: Config.borderRounding
property bool blurEnabled: Config.blurEnabled
property bool shadowEnabled: shadowPadding > 0
property color csdShadowColor: Config.withAlpha(Theme.csdShadowColor, Theme.csdShadowColor.a * Config.windowOpacity)
property bool nativeChrome: false
property bool autoPlaceOnShow: true
property Component contentEffect: null
Expand Down Expand Up @@ -86,7 +87,7 @@ LauncherWindowBase {
height: root._contentH
radius: root.cornerRadius
blur: root.shadowPadding
color: Qt.rgba(0, 0, 0, 0.3)
color: root.csdShadowColor
}

layer.enabled: root.shadowEnabled && !root.nativeChrome
Expand Down
Loading