#
# 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 Darcula 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=#3c3f41
@foreground=#bbb
@selectionBackground=#4B6EAF
@selectionForeground=@foreground
@selectionInactiveBackground=#0D293E
@selectionInactiveForeground=@foreground
@disabledText=#888
@textComponentBackground=#45494A
@menuBackground=darken(@background,5%)
@menuHoverBackground=lighten(@menuBackground,10%,derived)
@menuCheckBackground=darken(@selectionBackground,10%)
@menuAcceleratorForeground=darken(@foreground,15%)
@menuAcceleratorSelectionForeground=@selectionForeground
@cellFocusColor=#000
@icon=#adadad

# 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=#4c5052
Button.hoverBackground=lighten($Button.background,3%,derived)
Button.pressedBackground=lighten($Button.background,6%,derived)
Button.selectedBackground=lighten($Button.background,10%,derived)
Button.selectedForeground=@foreground
Button.disabledSelectedBackground=lighten($Button.background,3%,derived)

Button.borderColor=#5e6060
Button.disabledBorderColor=#5e6060
Button.focusedBorderColor=#466d94
Button.hoverBorderColor=$Button.focusedBorderColor

Button.default.background=#365880
Button.default.foreground=#bbb
Button.default.hoverBackground=lighten($Button.default.background,3%,derived)
Button.default.pressedBackground=lighten($Button.default.background,6%,derived)
Button.default.borderColor=#4c708c
Button.default.hoverBorderColor=#537699
Button.default.focusedBorderColor=#537699
Button.default.focusColor=#43688c
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 ----

# enabled
CheckBox.icon.borderColor=#6B6B6B
CheckBox.icon.background=#43494A
CheckBox.icon.selectedBorderColor=$CheckBox.icon.borderColor
CheckBox.icon.selectedBackground=$CheckBox.icon.background
CheckBox.icon.checkmarkColor=#A7A7A7

# disabled
CheckBox.icon.disabledBorderColor=#545556
CheckBox.icon.disabledBackground=@background
CheckBox.icon.disabledCheckmarkColor=#606060

# focused
CheckBox.icon.focusedBorderColor=#466D94
CheckBox.icon.selectedFocusedBorderColor=#466D94

# hover
CheckBox.icon.hoverBorderColor=$CheckBox.icon.focusedBorderColor
CheckBox.icon.hoverBackground=lighten($CheckBox.icon.background,3%,derived)

# pressed
CheckBox.icon.pressedBackground=lighten($CheckBox.icon.background,6%,derived)

# used if CheckBox.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].selectedHoverBackground=darken($CheckBox.icon[filled].selectedBackground,3%)
# pressed
CheckBox.icon[filled].selectedPressedBackground=darken($CheckBox.icon[filled].selectedBackground,6%)


#---- ComboBox ----

ComboBox.buttonEditableBackground=#404445
ComboBox.buttonArrowColor=#9A9DA1
ComboBox.buttonDisabledArrowColor=#585858
ComboBox.buttonHoverArrowColor=#bbb


#---- Component ----

Component.borderColor=#646464
Component.disabledBorderColor=#646464
Component.focusedBorderColor=#466d94
Component.focusColor=#3d6185
Component.linkColor=#589df6
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%)


#---- InternalFrame ----

InternalFrame.activeTitleBackground=darken(@background,10%)
InternalFrame.activeTitleForeground=@foreground
InternalFrame.inactiveTitleBackground=darken(@background,5%)
InternalFrame.inactiveTitleForeground=@disabledText

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=#A7A7A7
Menu.icon.disabledArrowColor=#606060


#---- MenuBar ----

MenuBar.borderColor=#515151


#---- MenuItemCheckBox ----

MenuItemCheckBox.icon.checkmarkColor=#A7A7A7
MenuItemCheckBox.icon.disabledCheckmarkColor=#606060


#---- PasswordField ----

PasswordField.capsLockIconColor=#ffffff64


#---- Popup ----

Popup.dropShadowColor=#000
Popup.dropShadowOpacity=0.25


#---- PopupMenu ----

PopupMenu.borderColor=#5e5e5e


#---- ProgressBar ----

ProgressBar.background=#555
ProgressBar.foreground=#4A88C7
ProgressBar.selectionForeground=@foreground
ProgressBar.selectionBackground=@foreground


#---- RootPane ----

RootPane.activeBorderColor=darken(@background,7%,derived)
RootPane.inactiveBorderColor=darken(@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=#515151


#---- Slider ----

Slider.trackValueColor=#4A88C7
Slider.trackColor=#646464
Slider.thumbColor=$Slider.trackValueColor
Slider.tickColor=#888
Slider.focusedColor=fade($Component.focusColor,70%,derived)
Slider.hoverThumbColor=darken($Slider.thumbColor,10%,derived)
Slider.pressedThumbColor=darken($Slider.thumbColor,15%,derived)
Slider.disabledTrackColor=#4c5052
Slider.disabledThumbColor=$Slider.disabledTrackColor


#---- SplitPane ----

SplitPaneDivider.draggingColor=#646464
SplitPaneDivider.oneTouchHoverArrowColor=#7A7D81


#---- TabbedPane ----

TabbedPane.underlineColor=#4A88C7
TabbedPane.disabledUnderlineColor=#7a7a7a
TabbedPane.hoverColor=darken($TabbedPane.background,5%,derived noAutoInverse)
TabbedPane.focusColor=#3d4b5c
TabbedPane.contentAreaColor=#646464

TabbedPane.buttonHoverBackground=darken($TabbedPane.background,5%,derived noAutoInverse)
TabbedPane.buttonPressedBackground=darken($TabbedPane.background,8%,derived noAutoInverse)

TabbedPane.closeBackground=null
TabbedPane.closeForeground=@disabledText
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,3%)


#---- TableHeader ----

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


#---- TitlePane ----

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


#---- ToggleButton ----

ToggleButton.selectedBackground=lighten($ToggleButton.background,10%,derived)
ToggleButton.disabledSelectedBackground=lighten($ToggleButton.background,3%,derived)

ToggleButton.toolbar.selectedBackground=lighten($ToggleButton.background,7%,derived)


#---- ToolTip ----

ToolTip.border=4,6,4,6
ToolTip.background=#1e2123


#---- Tree ----

Tree.hash=#505355
