Browse Source
Merge in DESIGN/design from ~VITO/c-design:newui to newui * commit '6e43341cfda9ff7eea950e000ae3669c51ca75fe': 无jira任务 漏了 REPORT-99485 change: 主题继承关系变更newui
vito-刘恒霖
1 year ago
10 changed files with 486 additions and 80 deletions
@ -0,0 +1,28 @@
|
||||
package com.fine.theme.light.ui.laf; |
||||
|
||||
import com.formdev.flatlaf.FlatLaf; |
||||
|
||||
/** |
||||
* Fine designer new look and feel |
||||
* FineLaf.properties 定义公共属性,如UI等, |
||||
* 其他主题继承该主题进行自定义,防止出现UI不存在等问题 |
||||
* |
||||
* @author vito |
||||
* @since 11.0 |
||||
* Created on 2023/12/18 |
||||
*/ |
||||
public abstract class FineLaf extends FlatLaf { |
||||
|
||||
private static final String NAME = "FineLaf"; |
||||
|
||||
|
||||
@Override |
||||
public String getName() { |
||||
return NAME; |
||||
} |
||||
|
||||
@Override |
||||
public String getDescription() { |
||||
return "Fine New Look and Feel"; |
||||
} |
||||
} |
@ -0,0 +1,351 @@
|
||||
#---- variables ---- |
||||
|
||||
# general background and foreground (text color) |
||||
@background = #3c3f41 |
||||
@foreground = #bbb |
||||
@disabledBackground = @background |
||||
@disabledForeground = shade(@foreground,25%) |
||||
|
||||
# component background |
||||
@buttonBackground = tint(@background,9%) |
||||
@componentBackground = tint(@background,5%) |
||||
@menuBackground = darken(@background,5%) |
||||
|
||||
# selection |
||||
@selectionBackground = @accentSelectionBackground |
||||
@selectionForeground = contrast(@selectionBackground, @background, @foreground, 25%) |
||||
@selectionInactiveBackground = spin(saturate(shade(@selectionBackground,70%),20%),-15) |
||||
@selectionInactiveForeground = @foreground |
||||
|
||||
# menu |
||||
@menuSelectionBackground = @selectionBackground |
||||
@menuHoverBackground = lighten(@menuBackground,10%,derived) |
||||
@menuCheckBackground = darken(@menuSelectionBackground,10%,derived noAutoInverse) |
||||
@menuAcceleratorForeground = darken(@foreground,15%) |
||||
@menuAcceleratorSelectionForeground = @selectionForeground |
||||
|
||||
# misc |
||||
@cellFocusColor = lighten(@selectionBackground,10%) |
||||
@icon = shade(@foreground,7%) |
||||
|
||||
# accent colors (blueish) |
||||
# set @accentColor to use single accent color or |
||||
# modify @accentBaseColor to use variations of accent base color |
||||
@accentColor = systemColor(accent,null) |
||||
@accentBaseColor = #4B6EAF |
||||
@accentBase2Color = lighten(saturate(spin(@accentBaseColor,-8),13%),5%) |
||||
# accent color variations |
||||
@accentFocusColor = if(@accentColor, @accentColor, shade(spin(@accentBaseColor,-8),20%)) |
||||
@accentLinkColor = if(@accentColor, @accentColor, lighten(saturate(spin(@accentBaseColor,-5),50%),16%)) |
||||
@accentSelectionBackground = if(@accentColor, @accentColor, @accentBaseColor) |
||||
@accentSliderColor = if(@accentColor, @accentColor, @accentBase2Color) |
||||
@accentUnderlineColor = if(@accentColor, @accentColor, @accentBase2Color) |
||||
@accentButtonDefaultBackground = if(@accentColor, @accentColor, darken(spin(@accentBaseColor,-8),13%)) |
||||
|
||||
# for buttons within components (e.g. combobox or spinner) |
||||
@buttonArrowColor = shade(@foreground,17%) |
||||
@buttonDisabledArrowColor = darken(@buttonArrowColor,25%) |
||||
@buttonHoverArrowColor = lighten(@buttonArrowColor,10%,derived noAutoInverse) |
||||
@buttonPressedArrowColor = lighten(@buttonArrowColor,20%,derived noAutoInverse) |
||||
|
||||
# Drop (use lazy colors for IntelliJ platform themes, which usually do not specify these colors) |
||||
@dropCellBackground = darken(List.selectionBackground,10%,lazy) |
||||
@dropCellForeground = lazy(List.selectionForeground) |
||||
@dropLineColor = lighten(List.selectionBackground,10%,lazy) |
||||
@dropLineShortColor = lighten(List.selectionBackground,30%,lazy) |
||||
|
||||
|
||||
#---- system colors ---- |
||||
|
||||
activeCaption = #434E60 |
||||
inactiveCaption = #393C3D |
||||
controlHighlight = darken($controlShadow,20%) |
||||
controlLtHighlight = darken($controlShadow,25%) |
||||
controlDkShadow = lighten($controlShadow,10%) |
||||
|
||||
|
||||
#---- Button ---- |
||||
|
||||
Button.background = @buttonBackground |
||||
Button.hoverBackground = lighten($Button.background,3%,derived) |
||||
Button.pressedBackground = lighten($Button.background,6%,derived) |
||||
Button.selectedBackground = lighten($Button.background,10%,derived) |
||||
Button.selectedForeground = $Button.foreground |
||||
Button.disabledSelectedBackground = lighten($Button.background,3%,derived) |
||||
|
||||
Button.borderColor = tint($Button.background,10%) |
||||
Button.disabledBorderColor = $Button.borderColor |
||||
Button.focusedBorderColor = $Component.focusedBorderColor |
||||
Button.hoverBorderColor = $Button.focusedBorderColor |
||||
|
||||
Button.innerFocusWidth = 1 |
||||
|
||||
Button.default.background = @accentButtonDefaultBackground |
||||
Button.default.foreground = contrast($Button.default.background, @background, $Button.foreground, 25%) |
||||
Button.default.hoverBackground = lighten($Button.default.background,3%,derived) |
||||
Button.default.pressedBackground = lighten($Button.default.background,6%,derived) |
||||
Button.default.borderColor = tint($Button.default.background,15%) |
||||
Button.default.hoverBorderColor = tint($Button.default.background,18%) |
||||
Button.default.focusedBorderColor = $Button.default.hoverBorderColor |
||||
Button.default.focusColor = lighten($Component.focusColor,3%) |
||||
Button.default.boldText = true |
||||
|
||||
Button.toolbar.hoverBackground = lighten($Button.background,1%,derived) |
||||
Button.toolbar.pressedBackground = lighten($Button.background,4%,derived) |
||||
Button.toolbar.selectedBackground = lighten($Button.background,7%,derived) |
||||
|
||||
|
||||
#---- CheckBox ---- |
||||
|
||||
CheckBox.icon.focusWidth = 1 |
||||
|
||||
# enabled |
||||
CheckBox.icon.borderColor = tint($Component.borderColor,5%) |
||||
CheckBox.icon.background = tint(@background,5%) |
||||
CheckBox.icon.selectedBorderColor = tint($CheckBox.icon.borderColor,20%) |
||||
CheckBox.icon.selectedBackground = $CheckBox.icon.background |
||||
CheckBox.icon.checkmarkColor = shade(@foreground,10%) |
||||
|
||||
# disabled |
||||
CheckBox.icon.disabledBorderColor = shade($CheckBox.icon.borderColor,20%) |
||||
CheckBox.icon.disabledBackground = @disabledBackground |
||||
CheckBox.icon.disabledCheckmarkColor = darken($CheckBox.icon.checkmarkColor,25%) |
||||
|
||||
# focused |
||||
CheckBox.icon.focusedBorderColor = $Component.focusedBorderColor |
||||
CheckBox.icon.focusedBackground = fade($CheckBox.icon.focusedBorderColor,30%) |
||||
|
||||
# hover |
||||
CheckBox.icon.hoverBorderColor = $CheckBox.icon.focusedBorderColor |
||||
CheckBox.icon.hoverBackground = lighten($CheckBox.icon.background,3%,derived) |
||||
|
||||
# pressed |
||||
CheckBox.icon.pressedBorderColor = $CheckBox.icon.focusedBorderColor |
||||
CheckBox.icon.pressedBackground = lighten($CheckBox.icon.background,6%,derived) |
||||
|
||||
|
||||
# used if CheckBox.icon.style or RadioButton.icon.style = filled |
||||
# enabled |
||||
CheckBox.icon[filled].selectedBorderColor = $CheckBox.icon.checkmarkColor |
||||
CheckBox.icon[filled].selectedBackground = $CheckBox.icon.checkmarkColor |
||||
CheckBox.icon[filled].checkmarkColor = $CheckBox.icon.background |
||||
# hover |
||||
CheckBox.icon[filled].hoverSelectedBackground = darken($CheckBox.icon[filled].selectedBackground,3%,derived) |
||||
# pressed |
||||
CheckBox.icon[filled].pressedSelectedBackground = darken($CheckBox.icon[filled].selectedBackground,6%,derived) |
||||
|
||||
|
||||
#---- CheckBoxMenuItem ---- |
||||
|
||||
CheckBoxMenuItem.icon.checkmarkColor = @buttonArrowColor |
||||
CheckBoxMenuItem.icon.disabledCheckmarkColor = @buttonDisabledArrowColor |
||||
|
||||
|
||||
#---- Component ---- |
||||
|
||||
Component.borderColor = tint(@background,19%) |
||||
Component.disabledBorderColor = $Component.borderColor |
||||
Component.focusedBorderColor = lighten($Component.focusColor,5%) |
||||
Component.focusColor = @accentFocusColor |
||||
Component.linkColor = @accentLinkColor |
||||
Component.accentColor = if(@accentColor, @accentColor, @accentBaseColor) |
||||
Component.grayFilter = -20,-70,100 |
||||
|
||||
Component.error.borderColor = desaturate($Component.error.focusedBorderColor,25%) |
||||
Component.error.focusedBorderColor = #8b3c3c |
||||
Component.warning.borderColor = darken(desaturate($Component.warning.focusedBorderColor,20%),10%) |
||||
Component.warning.focusedBorderColor = #ac7920 |
||||
Component.custom.borderColor = desaturate(#f00,50%,relative derived noAutoInverse) |
||||
|
||||
|
||||
#---- Desktop ---- |
||||
|
||||
Desktop.background = #3E434C |
||||
|
||||
|
||||
#---- DesktopIcon ---- |
||||
|
||||
DesktopIcon.background = lighten($Desktop.background,10%,derived) |
||||
|
||||
|
||||
#---- HelpButton ---- |
||||
|
||||
HelpButton.questionMarkColor = shade(@foreground,10%) |
||||
HelpButton.disabledQuestionMarkColor = tint(@background,30%) |
||||
|
||||
|
||||
#---- InternalFrame ---- |
||||
|
||||
InternalFrame.activeTitleBackground = darken(@background,10%) |
||||
InternalFrame.activeTitleForeground = @foreground |
||||
InternalFrame.inactiveTitleBackground = lighten($InternalFrame.activeTitleBackground,5%) |
||||
InternalFrame.inactiveTitleForeground = @disabledForeground |
||||
|
||||
InternalFrame.activeBorderColor = darken(@background,7%) |
||||
InternalFrame.inactiveBorderColor = darken(@background,3%) |
||||
|
||||
InternalFrame.buttonHoverBackground = lighten($InternalFrame.activeTitleBackground,10%,derived) |
||||
InternalFrame.buttonPressedBackground = lighten($InternalFrame.activeTitleBackground,20%,derived) |
||||
InternalFrame.closeHoverBackground = lazy(Actions.Red) |
||||
InternalFrame.closePressedBackground = darken(Actions.Red,10%,lazy) |
||||
InternalFrame.closeHoverForeground = #fff |
||||
InternalFrame.closePressedForeground = #fff |
||||
|
||||
InternalFrame.activeDropShadowOpacity = 0.5 |
||||
InternalFrame.inactiveDropShadowOpacity = 0.75 |
||||
|
||||
|
||||
#---- Menu ---- |
||||
|
||||
Menu.icon.arrowColor = @buttonArrowColor |
||||
Menu.icon.disabledArrowColor = @buttonDisabledArrowColor |
||||
|
||||
|
||||
#---- MenuBar ---- |
||||
|
||||
MenuBar.borderColor = $Separator.foreground |
||||
|
||||
|
||||
#---- PasswordField ---- |
||||
|
||||
PasswordField.capsLockIconColor = #ffffff64 |
||||
PasswordField.revealIconColor = @foreground |
||||
|
||||
|
||||
#---- Popup ---- |
||||
|
||||
Popup.dropShadowColor = #000 |
||||
Popup.dropShadowOpacity = 0.25 |
||||
|
||||
|
||||
#---- PopupMenu ---- |
||||
|
||||
PopupMenu.borderColor = tint(@background,17%) |
||||
PopupMenu.hoverScrollArrowBackground = lighten(@background,5%) |
||||
|
||||
|
||||
#---- ProgressBar ---- |
||||
|
||||
ProgressBar.background = lighten(@background,8%) |
||||
ProgressBar.foreground = @accentSliderColor |
||||
ProgressBar.selectionBackground = @foreground |
||||
ProgressBar.selectionForeground = contrast($ProgressBar.foreground, @background, @foreground, 25%) |
||||
|
||||
|
||||
#---- RootPane ---- |
||||
|
||||
RootPane.activeBorderColor = lighten(@background,7%,derived) |
||||
RootPane.inactiveBorderColor = lighten(@background,5%,derived) |
||||
|
||||
|
||||
#---- ScrollBar ---- |
||||
|
||||
ScrollBar.track = lighten(@background,1%,derived noAutoInverse) |
||||
ScrollBar.thumb = lighten($ScrollBar.track,10%,derived noAutoInverse) |
||||
ScrollBar.hoverTrackColor = lighten($ScrollBar.track,4%,derived noAutoInverse) |
||||
ScrollBar.hoverThumbColor = lighten($ScrollBar.thumb,10%,derived noAutoInverse) |
||||
ScrollBar.pressedThumbColor = lighten($ScrollBar.thumb,15%,derived noAutoInverse) |
||||
ScrollBar.hoverButtonBackground = lighten(@background,5%,derived noAutoInverse) |
||||
ScrollBar.pressedButtonBackground = lighten(@background,10%,derived noAutoInverse) |
||||
|
||||
|
||||
#---- Separator ---- |
||||
|
||||
Separator.foreground = tint(@background,10%) |
||||
|
||||
|
||||
#---- Slider ---- |
||||
|
||||
Slider.trackValueColor = @accentSliderColor |
||||
Slider.trackColor = lighten(@background,15%) |
||||
Slider.thumbColor = $Slider.trackValueColor |
||||
Slider.tickColor = @disabledForeground |
||||
Slider.focusedColor = fade(changeLightness($Component.focusColor,60%,derived),30%,derived) |
||||
Slider.hoverThumbColor = lighten($Slider.thumbColor,5%,derived) |
||||
Slider.pressedThumbColor = lighten($Slider.thumbColor,8%,derived) |
||||
Slider.disabledTrackColor = lighten(@background,10%) |
||||
Slider.disabledThumbColor = $Slider.disabledTrackColor |
||||
|
||||
|
||||
#---- SplitPane ---- |
||||
|
||||
SplitPaneDivider.draggingColor = $Component.borderColor |
||||
|
||||
|
||||
#---- TabbedPane ---- |
||||
|
||||
TabbedPane.underlineColor = @accentUnderlineColor |
||||
TabbedPane.inactiveUnderlineColor = mix(@accentUnderlineColor,$TabbedPane.background,60%) |
||||
TabbedPane.disabledUnderlineColor = lighten(@background,23%) |
||||
TabbedPane.hoverColor = darken($TabbedPane.background,5%,derived noAutoInverse) |
||||
TabbedPane.focusColor = mix(@selectionBackground,$TabbedPane.background,25%) |
||||
TabbedPane.contentAreaColor = $Component.borderColor |
||||
|
||||
TabbedPane.buttonHoverBackground = darken($TabbedPane.background,5%,derived noAutoInverse) |
||||
TabbedPane.buttonPressedBackground = darken($TabbedPane.background,8%,derived noAutoInverse) |
||||
|
||||
TabbedPane.closeBackground = null |
||||
TabbedPane.closeForeground = @disabledForeground |
||||
TabbedPane.closeHoverBackground = lighten($TabbedPane.background,5%,derived) |
||||
TabbedPane.closeHoverForeground = @foreground |
||||
TabbedPane.closePressedBackground = lighten($TabbedPane.background,10%,derived) |
||||
TabbedPane.closePressedForeground = $TabbedPane.closeHoverForeground |
||||
|
||||
|
||||
#---- Table ---- |
||||
|
||||
Table.gridColor = lighten($Table.background,8%) |
||||
|
||||
|
||||
#---- TableHeader ---- |
||||
|
||||
TableHeader.hoverBackground = lighten($TableHeader.background,5%,derived) |
||||
TableHeader.pressedBackground = lighten($TableHeader.background,10%,derived) |
||||
TableHeader.separatorColor = lighten($TableHeader.background,10%) |
||||
TableHeader.bottomSeparatorColor = $TableHeader.separatorColor |
||||
|
||||
|
||||
#---- TitlePane ---- |
||||
|
||||
TitlePane.embeddedForeground = darken($TitlePane.foreground,15%) |
||||
TitlePane.buttonHoverBackground = lighten($TitlePane.background,15%,derived) |
||||
TitlePane.buttonPressedBackground = lighten($TitlePane.background,10%,derived) |
||||
|
||||
|
||||
#---- ToggleButton ---- |
||||
|
||||
ToggleButton.selectedBackground = lighten($ToggleButton.background,10%,derived) |
||||
ToggleButton.disabledSelectedBackground = lighten($ToggleButton.background,3%,derived) |
||||
|
||||
ToggleButton.toolbar.selectedBackground = lighten($ToggleButton.background,7%,derived) |
||||
|
||||
|
||||
#---- ToolBar ---- |
||||
|
||||
ToolBar.hoverButtonGroupBackground = lighten($ToolBar.background,3%,derived) |
||||
|
||||
|
||||
#---- ToolTip ---- |
||||
|
||||
ToolTip.border = 4,6,4,6 |
||||
ToolTip.background = shade(@background,50%) |
||||
|
||||
|
||||
#---- Tree ---- |
||||
|
||||
Tree.hash = lighten($Tree.background,5%) |
||||
|
||||
|
||||
|
||||
#---- Styles ------------------------------------------------------------------ |
||||
|
||||
#---- inTextField ---- |
||||
# for leading/trailing components in text fields |
||||
|
||||
[style]Button.inTextField = \ |
||||
focusable: false; \ |
||||
toolbar.margin: 1,1,1,1; \ |
||||
toolbar.spacingInsets: 1,1,1,1; \ |
||||
toolbar.hoverBackground: lighten($TextField.background,5%); \ |
||||
toolbar.pressedBackground: lighten($TextField.background,10%); \ |
||||
toolbar.selectedBackground: lighten($TextField.background,15%) |
@ -0,0 +1,47 @@
|
||||
# \u516C\u5171\u5C5E\u6027\uFF0C\u5982UI\u7B49\uFF0C\u5176\u4ED6\u4E3B\u9898\u7EE7\u627F\u8BE5\u4E3B\u9898\uFF0C\u9632\u6B62\u51FA\u73B0UI\u4E0D\u5B58\u5728\u7B49\u95EE\u9898 |
||||
#---- UI delegates ---- |
||||
ButtonUI=com.formdev.flatlaf.ui.FlatButtonUI |
||||
CheckBoxUI=com.fine.theme.light.ui.FineCheckBoxUI |
||||
CheckBoxMenuItemUI=com.formdev.flatlaf.ui.FlatCheckBoxMenuItemUI |
||||
ColorChooserUI=com.formdev.flatlaf.ui.FlatColorChooserUI |
||||
ComboBoxUI=com.fine.theme.light.ui.FineComboBoxUI |
||||
DesktopIconUI=com.formdev.flatlaf.ui.FlatDesktopIconUI |
||||
DesktopPaneUI=com.formdev.flatlaf.ui.FlatDesktopPaneUI |
||||
EditorPaneUI=com.formdev.flatlaf.ui.FlatEditorPaneUI |
||||
FileChooserUI=com.formdev.flatlaf.ui.FlatFileChooserUI |
||||
FormattedTextFieldUI=com.formdev.flatlaf.ui.FlatFormattedTextFieldUI |
||||
InternalFrameUI=com.formdev.flatlaf.ui.FlatInternalFrameUI |
||||
LabelUI=com.formdev.flatlaf.ui.FlatLabelUI |
||||
ListUI=com.formdev.flatlaf.ui.FlatListUI |
||||
MenuUI=com.formdev.flatlaf.ui.FlatMenuUI |
||||
MenuBarUI=com.formdev.flatlaf.ui.FlatMenuBarUI |
||||
MenuItemUI=com.formdev.flatlaf.ui.FlatMenuItemUI |
||||
OptionPaneUI=com.formdev.flatlaf.ui.FlatOptionPaneUI |
||||
PanelUI=com.formdev.flatlaf.ui.FlatPanelUI |
||||
PasswordFieldUI=com.formdev.flatlaf.ui.FlatPasswordFieldUI |
||||
PopupMenuUI=com.formdev.flatlaf.ui.FlatPopupMenuUI |
||||
PopupMenuSeparatorUI=com.formdev.flatlaf.ui.FlatPopupMenuSeparatorUI |
||||
ProgressBarUI=com.formdev.flatlaf.ui.FlatProgressBarUI |
||||
RadioButtonUI=com.formdev.flatlaf.ui.FlatRadioButtonUI |
||||
RadioButtonMenuItemUI=com.formdev.flatlaf.ui.FlatRadioButtonMenuItemUI |
||||
RootPaneUI=com.formdev.flatlaf.ui.FlatRootPaneUI |
||||
ScrollBarUI=com.formdev.flatlaf.ui.FlatScrollBarUI |
||||
ScrollPaneUI=com.formdev.flatlaf.ui.FlatScrollPaneUI |
||||
SeparatorUI=com.formdev.flatlaf.ui.FlatSeparatorUI |
||||
SliderUI=com.formdev.flatlaf.ui.FlatSliderUI |
||||
SpinnerUI=com.formdev.flatlaf.ui.FlatSpinnerUI |
||||
SplitPaneUI=com.formdev.flatlaf.ui.FlatSplitPaneUI |
||||
TabbedPaneUI=com.formdev.flatlaf.ui.FlatTabbedPaneUI |
||||
TableUI=com.formdev.flatlaf.ui.FlatTableUI |
||||
TableHeaderUI=com.formdev.flatlaf.ui.FlatTableHeaderUI |
||||
TextAreaUI=com.formdev.flatlaf.ui.FlatTextAreaUI |
||||
TextFieldUI=com.formdev.flatlaf.ui.FlatTextFieldUI |
||||
TextPaneUI=com.formdev.flatlaf.ui.FlatTextPaneUI |
||||
ToggleButtonUI=com.fine.theme.light.ui.FineToggleButtonUI |
||||
ToolBarUI=com.formdev.flatlaf.ui.FlatToolBarUI |
||||
ToolBarSeparatorUI=com.formdev.flatlaf.ui.FlatToolBarSeparatorUI |
||||
ToolTipUI=com.fine.theme.light.ui.FineTooltipUI |
||||
TreeUI=com.fine.theme.light.ui.UIFlatTreeUI |
||||
ViewportUI=com.formdev.flatlaf.ui.FlatViewportUI |
||||
HeadGroupUI=com.fine.theme.light.ui.FineHeadGroupUI |
||||
|
Loading…
Reference in new issue