#
# 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.
#

#
# This file is loaded for all light themes (that extend class FlatLightLaf).
#
# Documentation:
#  - https://www.formdev.com/flatlaf/properties-files/
#  - https://www.formdev.com/flatlaf/how-to-customize/
#
# NOTE: Avoid copying the whole content of this file to own properties files.
#       This will make upgrading to newer FlatLaf versions complex and error-prone.
#       Instead copy and modify only those properties that you need to alter.
#

# 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%,derived noAutoInverse)
@menuAcceleratorForeground = lighten(@foreground,30%)
@menuAcceleratorSelectionForeground = @selectionForeground
@cellFocusColor = #000
@icon = #afafaf

# for buttons within components (e.g. combobox or spinner)
@buttonArrowColor = #666
@buttonDisabledArrowColor = lighten(@buttonArrowColor,25%)
@buttonHoverArrowColor = lighten(@buttonArrowColor,20%,derived noAutoInverse)
@buttonPressedArrowColor = lighten(@buttonArrowColor,30%,derived noAutoInverse)

# 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 = lighten($controlShadow,12%)
controlLtHighlight = lighten($controlShadow,25%)
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.innerFocusWidth = 0

Button.default.background = $Button.background
Button.default.foreground = @foreground
Button.default.focusedBackground = $Button.focusedBackground
Button.default.hoverBackground = darken($Button.default.background,3%,derived)
Button.default.pressedBackground = darken($Button.default.background,10%,derived)
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%,derived)
# pressed
CheckBox.icon[filled].selectedPressedBackground = darken($CheckBox.icon[filled].selectedBackground,10%,derived)


#---- ComboBox ----

ComboBox.buttonEditableBackground = darken($ComboBox.background,2%)


#---- 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%,derived)


#---- 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 = darken(@background,50%,derived)
RootPane.inactiveBorderColor = darken(@background,30%,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.trackValueColor = #1E82E6
Slider.trackColor = #c4c4c4
Slider.thumbColor = $Slider.trackValueColor
Slider.tickColor = #888
Slider.focusedColor = fade($Component.focusColor,50%,derived)
Slider.hoverThumbColor = darken($Slider.thumbColor,5%,derived)
Slider.pressedThumbColor = darken($Slider.thumbColor,8%,derived)
Slider.disabledTrackColor = #c0c0c0
Slider.disabledThumbColor = $Slider.disabledTrackColor


#---- SplitPane ----

SplitPaneDivider.draggingColor = #c4c4c4


#---- TabbedPane ----

TabbedPane.underlineColor = #4083C9
TabbedPane.disabledUnderlineColor = #ababab
TabbedPane.hoverColor = darken($TabbedPane.background,7%,derived)
TabbedPane.focusColor = #dae4ed
TabbedPane.contentAreaColor = #bfbfbf

TabbedPane.buttonHoverBackground = darken($TabbedPane.background,7%,derived)
TabbedPane.buttonPressedBackground = darken($TabbedPane.background,10%,derived)

TabbedPane.closeBackground = null
TabbedPane.closeForeground = @disabledText
TabbedPane.closeHoverBackground = darken($TabbedPane.background,20%,derived)
TabbedPane.closeHoverForeground = @foreground
TabbedPane.closePressedBackground = darken($TabbedPane.background,25%,derived)
TabbedPane.closePressedForeground = $TabbedPane.closeHoverForeground


#---- Table ----

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


#---- 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 = darken($Tree.background,10%)
