diff --git a/windows/src/main/java/com/github/weisj/darklaf/platform/windows/WindowsDecorationsProvider.java b/windows/src/main/java/com/github/weisj/darklaf/platform/windows/WindowsDecorationsProvider.java index 925d4e3b..3eb588e9 100644 --- a/windows/src/main/java/com/github/weisj/darklaf/platform/windows/WindowsDecorationsProvider.java +++ b/windows/src/main/java/com/github/weisj/darklaf/platform/windows/WindowsDecorationsProvider.java @@ -23,6 +23,7 @@ package com.github.weisj.darklaf.platform.windows; import java.awt.*; import java.util.Properties; +import java.util.function.Consumer; import javax.swing.*; import javax.swing.border.Border; @@ -101,11 +102,13 @@ public class WindowsDecorationsProvider implements DecorationsProvider { @Override public void loadDecorationProperties(final Properties properties, final UIDefaults currentDefaults) { IconLoader iconLoader = IconLoader.get(WindowsDecorationsProvider.class); - PropertyLoader.putProperties( - PropertyLoader.loadProperties(WindowsDecorationsProvider.class, "windows_decorations", ""), properties, - currentDefaults, iconLoader); - PropertyLoader.putProperties( - PropertyLoader.loadProperties(WindowsDecorationsProvider.class, "windows_icons", ""), properties, - currentDefaults, iconLoader); + Consumer loadProps = fileName -> PropertyLoader.putProperties( + PropertyLoader.loadProperties(WindowsDecorationsProvider.class, fileName, ""), + properties, currentDefaults, iconLoader); + loadProps.accept("windows_icons"); + loadProps.accept("windows_decorations"); + if (SystemInfo.isWindows11OrGreater) { + loadProps.accept("windows_11_decorations"); + } } } diff --git a/windows/src/main/resources/com/github/weisj/darklaf/platform/windows/icons/window/maximize11.svg b/windows/src/main/resources/com/github/weisj/darklaf/platform/windows/icons/window/maximize11.svg new file mode 100644 index 00000000..4e0ea89f --- /dev/null +++ b/windows/src/main/resources/com/github/weisj/darklaf/platform/windows/icons/window/maximize11.svg @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/windows/src/main/resources/com/github/weisj/darklaf/platform/windows/icons/window/maximize11Inactive.svg b/windows/src/main/resources/com/github/weisj/darklaf/platform/windows/icons/window/maximize11Inactive.svg new file mode 100644 index 00000000..c9f761c2 --- /dev/null +++ b/windows/src/main/resources/com/github/weisj/darklaf/platform/windows/icons/window/maximize11Inactive.svg @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/windows/src/main/resources/com/github/weisj/darklaf/platform/windows/icons/window/restore11.svg b/windows/src/main/resources/com/github/weisj/darklaf/platform/windows/icons/window/restore11.svg new file mode 100644 index 00000000..77870d61 --- /dev/null +++ b/windows/src/main/resources/com/github/weisj/darklaf/platform/windows/icons/window/restore11.svg @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/windows/src/main/resources/com/github/weisj/darklaf/platform/windows/icons/window/restore11Inactive.svg b/windows/src/main/resources/com/github/weisj/darklaf/platform/windows/icons/window/restore11Inactive.svg new file mode 100644 index 00000000..0af8adcb --- /dev/null +++ b/windows/src/main/resources/com/github/weisj/darklaf/platform/windows/icons/window/restore11Inactive.svg @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/windows/src/main/resources/com/github/weisj/darklaf/platform/windows/windows_11_decorations.properties b/windows/src/main/resources/com/github/weisj/darklaf/platform/windows/windows_11_decorations.properties new file mode 100644 index 00000000..60eb4f11 --- /dev/null +++ b/windows/src/main/resources/com/github/weisj/darklaf/platform/windows/windows_11_decorations.properties @@ -0,0 +1,30 @@ +# +# MIT License +# +# Copyright (c) 2021 Jannis Weis +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. +# +# +# suppress inspection "UnusedProperty" for whole file +# +Windows.TitlePane.maximize.icon = icons/window/maximize11.svg[themed] +Windows.TitlePane.maximizeInactive.icon = icons/window/maximize11Inactive.svg[themed] +Windows.TitlePane.restore.icon = icons/window/restore11.svg[themed] +Windows.TitlePane.restoreInactive.icon = icons/window/restore11Inactive.svg[themed]