#
# Copyright 2019 FormDev Software GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# Colors and style mostly based on IntelliJ theme from IntelliJ IDEA Community Edition,
# which is licensed under the Apache 2.0 license. Copyright 2000-2019 JetBrains s.r.o.
# See: https://github.com/JetBrains/intellij-community/

#---- variables ----

@background=#f2f2f2
@foreground=#000
@selectionBackground=#2675BF
@selectionForeground=#fff
@selectionInactiveBackground=#d4d4d4
@selectionInactiveForeground=@foreground
@disabledText=#8C8C8C
@textComponentBackground=#fff
@menuBackground=#fff
@menuHoverBackground=darken(@menuBackground,10%,derived)
@menuCheckBackground=lighten(@selectionBackground,40%)
@menuAcceleratorForeground=lighten(@foreground,30%)
@menuAcceleratorSelectionForeground=@selectionForeground
@cellFocusColor=#000
@icon=#afafaf

# Drop (use lazy colors for IntelliJ platform themes, which usually do not specify these colors)
@dropCellBackground=lighten(List.selectionBackground,10%,lazy)
@dropCellForeground=lazy(List.selectionForeground)
@dropLineColor=lighten(List.selectionBackground,20%,lazy)
@dropLineShortColor=darken(List.selectionBackground,20%,lazy)


#---- system colors ----

activeCaption=#99b4d1
inactiveCaption=#bfcddb
controlHighlight=#e3e3e3
controlLtHighlight=#fff
controlDkShadow=darken($controlShadow,15%)


#---- Button ----

Button.background=#fff
Button.focusedBackground=#e3f1fa
Button.hoverBackground=darken($Button.background,3%,derived)
Button.pressedBackground=darken($Button.background,10%,derived)
Button.selectedBackground=darken($Button.background,20%,derived)
Button.selectedForeground=@foreground
Button.disabledSelectedBackground=darken($Button.background,13%,derived)

Button.borderColor=$Component.borderColor
Button.disabledBorderColor=$Component.disabledBorderColor
Button.focusedBorderColor=$Component.focusedBorderColor
Button.hoverBorderColor=$Button.focusedBorderColor

Button.default.background=$Button.background
Button.default.foreground=@foreground
Button.default.focusedBackground=$Button.focusedBackground
Button.default.hoverBackground=$Button.hoverBackground
Button.default.pressedBackground=$Button.pressedBackground
Button.default.borderColor=#4F9EE3
Button.default.hoverBorderColor=$Button.hoverBorderColor
Button.default.focusedBorderColor=$Button.focusedBorderColor
Button.default.focusColor=$Component.focusColor
Button.default.borderWidth=2

Button.toolbar.hoverBackground=darken($Button.background,12%,derived)
Button.toolbar.pressedBackground=darken($Button.background,15%,derived)
Button.toolbar.selectedBackground=$Button.selectedBackground


#---- CheckBox ----

# enabled
CheckBox.icon.borderColor=#b0b0b0
CheckBox.icon.background=#fff
CheckBox.icon.selectedBorderColor=$CheckBox.icon.borderColor
CheckBox.icon.selectedBackground=$CheckBox.icon.background
CheckBox.icon.checkmarkColor=#4F9EE3

# disabled
CheckBox.icon.disabledBorderColor=#BDBDBD
CheckBox.icon.disabledBackground=@background
CheckBox.icon.disabledCheckmarkColor=#ABABAB

# focused
CheckBox.icon.focusedBorderColor=#7B9FC7
CheckBox.icon.focusedBackground=$Button.focusedBackground

# hover
CheckBox.icon.hoverBorderColor=$CheckBox.icon.focusedBorderColor
CheckBox.icon.hoverBackground=$Button.hoverBackground

# pressed
CheckBox.icon.pressedBackground=$Button.pressedBackground


# used if CheckBox.icon.style=filled
# enabled
CheckBox.icon[filled].selectedBorderColor=#4B97D9
CheckBox.icon[filled].selectedBackground=#4F9EE3
CheckBox.icon[filled].checkmarkColor=#fff
# focused
CheckBox.icon[filled].selectedFocusedBorderColor=#ACCFF7
CheckBox.icon[filled].selectedFocusedBackground=$CheckBox.icon[filled].selectedBackground
CheckBox.icon[filled].selectedFocusedCheckmarkColor=$CheckBox.icon.focusedBackground
# hover
CheckBox.icon[filled].selectedHoverBackground=darken($CheckBox.icon[filled].selectedBackground,5%)
# pressed
CheckBox.icon[filled].selectedPressedBackground=darken($CheckBox.icon[filled].selectedBackground,10%)


#---- ComboBox ----

ComboBox.buttonEditableBackground=#fafafa
ComboBox.buttonArrowColor=#666
ComboBox.buttonDisabledArrowColor=#ABABAB
ComboBox.buttonHoverArrowColor=#999


#---- Component ----

Component.borderColor=#c4c4c4
Component.disabledBorderColor=#cfcfcf
Component.focusedBorderColor=#87afda
Component.focusColor=#97c3f3
Component.linkColor=#2470B3
Component.grayFilter=25,-25,100

Component.error.borderColor=lighten(desaturate($Component.error.focusedBorderColor,20%),25%)
Component.error.focusedBorderColor=#e53e4d
Component.warning.borderColor=lighten(saturate($Component.warning.focusedBorderColor,25%),20%)
Component.warning.focusedBorderColor=#e2a53a
Component.custom.borderColor=lighten(desaturate(#f00,20%,derived noAutoInverse),25%,derived noAutoInverse)


#---- Desktop ----

Desktop.background=#E6EBF0


#---- DesktopIcon ----

DesktopIcon.background=darken($Desktop.background,10%)


#---- HelpButton ----

HelpButton.questionMarkColor=#4F9EE3


#---- InternalFrame ----

InternalFrame.activeTitleBackground=#fff
InternalFrame.activeTitleForeground=@foreground
InternalFrame.inactiveTitleBackground=#fafafa
InternalFrame.inactiveTitleForeground=@disabledText

InternalFrame.activeBorderColor=darken($Component.borderColor,20%)
InternalFrame.inactiveBorderColor=$Component.borderColor

InternalFrame.buttonHoverBackground=darken($InternalFrame.activeTitleBackground,10%,derived)
InternalFrame.buttonPressedBackground=darken($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.25
InternalFrame.inactiveDropShadowOpacity=0.5


#---- Menu ----

Menu.icon.arrowColor=#666
Menu.icon.disabledArrowColor=#ABABAB


#---- MenuBar ----

MenuBar.borderColor=#cdcdcd


#---- MenuItemCheckBox ----

MenuItemCheckBox.icon.checkmarkColor=#4F9EE3
MenuItemCheckBox.icon.disabledCheckmarkColor=#ABABAB


#---- PasswordField ----

PasswordField.capsLockIconColor=#00000064


#---- Popup ----

Popup.dropShadowColor=#000
Popup.dropShadowOpacity=0.15


#---- PopupMenu ----

PopupMenu.borderColor=#adadad


#---- ProgressBar ----

ProgressBar.background=#D1D1D1
ProgressBar.foreground=#1E82E6
ProgressBar.selectionForeground=@textComponentBackground
ProgressBar.selectionBackground=@foreground


#---- RootPane ----

RootPane.activeBorderColor=#707070
RootPane.inactiveBorderColor=lighten($RootPane.activeBorderColor,20%,derived)


#---- ScrollBar ----

ScrollBar.track=lighten(@background,1%,derived noAutoInverse)
ScrollBar.thumb=darken($ScrollBar.track,10%,derived noAutoInverse)
ScrollBar.hoverTrackColor=darken($ScrollBar.track,3%,derived noAutoInverse)
ScrollBar.hoverThumbColor=darken($ScrollBar.thumb,10%,derived noAutoInverse)
ScrollBar.pressedThumbColor=darken($ScrollBar.thumb,20%,derived noAutoInverse)
ScrollBar.hoverButtonBackground=darken(@background,5%,derived noAutoInverse)
ScrollBar.pressedButtonBackground=darken(@background,10%,derived noAutoInverse)


#---- Separator ----

Separator.foreground=#d1d1d1


#---- Slider ----

Slider.trackColor=#c4c4c4
Slider.thumbColor=#6e6e6e
Slider.tickColor=#888
Slider.hoverColor=lighten($Slider.thumbColor,15%,derived)
Slider.disabledForeground=#c0c0c0


#---- SplitPane ----

SplitPaneDivider.draggingColor=#c4c4c4
SplitPaneDivider.oneTouchHoverArrowColor=#333


#---- TabbedPane ----

TabbedPane.underlineColor=#4083C9
TabbedPane.disabledUnderlineColor=#ababab
TabbedPane.hoverColor=#d9d9d9
TabbedPane.focusColor=#dae4ed
TabbedPane.contentAreaColor=#bfbfbf

TabbedPane.closeBackground=null
TabbedPane.closeForeground=@disabledText
TabbedPane.closeHoverBackground=darken($TabbedPane.hoverColor,10%)
TabbedPane.closeHoverForeground=@foreground
TabbedPane.closePressedBackground=darken($TabbedPane.hoverColor,15%)
TabbedPane.closePressedForeground=$TabbedPane.closeHoverForeground


#---- Table ----

Table.gridColor=darken($Table.background,3%)


#---- TableHeader ----

TableHeader.separatorColor=darken($TableHeader.background,10%)
TableHeader.bottomSeparatorColor=$TableHeader.separatorColor


#---- TitlePane ----

TitlePane.embeddedForeground=lighten($TitlePane.foreground,35%)
TitlePane.buttonHoverBackground=darken($TitlePane.background,10%,derived)
TitlePane.buttonPressedBackground=darken($TitlePane.background,20%,derived)


#---- ToggleButton ----

ToggleButton.selectedBackground=darken($ToggleButton.background,20%,derived)
ToggleButton.disabledSelectedBackground=darken($ToggleButton.background,13%,derived)

ToggleButton.toolbar.selectedBackground=$ToggleButton.selectedBackground


#---- ToolTip ----

ToolTip.border=4,6,4,6,$InternalFrame.activeBorderColor
ToolTip.background=#fafafa


#---- Tree ----

Tree.hash=#E6E6E6
