Browse Source

Fixed titleBar icon size.

Changed TaskPane icon.
Moved platform libraries.

Signed-off-by: weisj <weisj@arcor.de>
pull/15/head
weisj 5 years ago
parent
commit
3b5ce0476f
  1. 2
      build.gradle
  2. 1
      src/main/java/com/github/weisj/darklaf/LafManager.java
  3. 4
      src/main/java/com/github/weisj/darklaf/platform/windows/JNIDecorations.java
  4. 0
      src/main/java/com/github/weisj/darklaf/theme/DarculaTheme.java
  5. 47
      src/main/java/com/github/weisj/darklaf/theme/DarculaTheme.java~Renamed to conform new group id
  6. 2
      src/main/java/com/github/weisj/darklaf/ui/rootpane/DarkTitlePane.java
  7. 10
      src/main/java/com/github/weisj/darklaf/ui/taskpane/DarkTaskPaneUI.java
  8. 0
      src/main/resources/com/github/weisj/darklaf/platform/windows/x64/jniplatform.dll
  9. 0
      src/main/resources/com/github/weisj/darklaf/platform/windows/x86/jniplatform.dll
  10. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/borders.properties
  11. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/button.properties
  12. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/checkBox.properties
  13. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/colorChooser.properties
  14. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/comboBox.properties
  15. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/fileChooser.properties
  16. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/internalFrame.properties
  17. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/label.properties
  18. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/list.properties
  19. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/menu.properties
  20. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/menuBar.properties
  21. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/menuItem.properties
  22. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/optionPane.properties
  23. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/panel.properties
  24. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/popupMenu.properties
  25. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/progressBar.properties
  26. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/radioButton.properties
  27. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/rootPane.properties
  28. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/scrollBar.properties
  29. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/scrollPane.properties
  30. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/separator.properties
  31. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/slider.properties
  32. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/spinner.properties
  33. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/splitPane.properties
  34. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/statusBar.properties
  35. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/tabFrame.properties
  36. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/tabbedPane.properties
  37. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/table.properties
  38. 4
      src/main/resources/com/github/weisj/darklaf/properties/ui/taskPane.properties
  39. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/text.properties
  40. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/toggleButton.properties
  41. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/toolBar.properties
  42. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/toolTip.properties
  43. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/tree.properties
  44. 1
      src/main/resources/com/github/weisj/darklaf/properties/ui/tristate.properties

2
build.gradle

@ -199,7 +199,7 @@ tasks.withType(JavaCompile) {
task copyLibraries(type: Copy) { task copyLibraries(type: Copy) {
dependsOn('jniplatformX64SharedLibrary', 'jniplatformX86SharedLibrary') dependsOn('jniplatformX64SharedLibrary', 'jniplatformX86SharedLibrary')
from "${buildDir}/libs/jniplatform/shared" from "${buildDir}/libs/jniplatform/shared"
into "${projectDir}/src/main/resources/library" into "${projectDir}/src/main/resources/com/github/weisj/darklaf/platform/windows"
} }
shadowJar { shadowJar {

1
src/main/java/com/github/weisj/darklaf/LafManager.java

@ -23,7 +23,6 @@
*/ */
package com.github.weisj.darklaf; package com.github.weisj.darklaf;
import com.github.weisj.darklaf.theme.DarculaTheme;
import com.github.weisj.darklaf.theme.IntelliJTheme; import com.github.weisj.darklaf.theme.IntelliJTheme;
import com.github.weisj.darklaf.theme.Theme; import com.github.weisj.darklaf.theme.Theme;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;

4
src/main/java/com/github/weisj/darklaf/platform/windows/JNIDecorations.java

@ -88,9 +88,9 @@ public class JNIDecorations {
if (loaded) return true; if (loaded) return true;
try { try {
if (SystemInfo.isX86) { if (SystemInfo.isX86) {
NativeUtil.loadLibraryFromJar("/library/x86/jniplatform.dll"); NativeUtil.loadLibraryFromJar("/com/github/weisj/darklaf/platform/windows/x86/jniplatform.dll");
} else if (SystemInfo.isX64) { } else if (SystemInfo.isX64) {
NativeUtil.loadLibraryFromJar("/library/x64/jniplatform.dll"); NativeUtil.loadLibraryFromJar("/com/github/weisj/darklaf/platform/windows/x64/jniplatform.dll");
} else { } else {
LOGGER.warning("Could not determine jre model '" LOGGER.warning("Could not determine jre model '"
+ SystemInfo.jreArchitecture + SystemInfo.jreArchitecture

0
src/main/java/com/github/weisj/darklaf/theme/DarculaTheme.java~HEAD → src/main/java/com/github/weisj/darklaf/theme/DarculaTheme.java

47
src/main/java/com/github/weisj/darklaf/theme/DarculaTheme.java~Renamed to conform new group id

@ -1,47 +0,0 @@
/*
* MIT License
*
* Copyright (c) 2019 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.
*/
package com.github.weisj.darklaf.theme;
/**
* @author Jannis Weis
*/
public class DarculaTheme extends Theme {
@Override
protected String getResourcePath() {
return "darcula/";
}
@Override
public String getName() {
return "darcula";
}
@Override
public boolean isDark() {
return true;
}
}

2
src/main/java/com/github/weisj/darklaf/ui/rootpane/DarkTitlePane.java

@ -585,8 +585,6 @@ public class DarkTitlePane extends JComponent {
Icon systemIcon; Icon systemIcon;
if (icons.size() == 0) { if (icons.size() == 0) {
systemIcon = UIManager.getIcon("TitlePane.icon"); systemIcon = UIManager.getIcon("TitlePane.icon");
} else if (icons.size() == 1) {
systemIcon = new ImageIcon(icons.get(0));
} else { } else {
systemIcon = new ImageIcon(SunToolkit.getScaledIconImage(icons, IMAGE_WIDTH, IMAGE_HEIGHT)); systemIcon = new ImageIcon(SunToolkit.getScaledIconImage(icons, IMAGE_WIDTH, IMAGE_HEIGHT));
} }

10
src/main/java/com/github/weisj/darklaf/ui/taskpane/DarkTaskPaneUI.java

@ -42,6 +42,8 @@ public class DarkTaskPaneUI extends MetalTaskPaneUI {
protected boolean isCollapsed; protected boolean isCollapsed;
protected Color borderColor; protected Color borderColor;
protected Icon collapsedIcon;
protected Icon openIcon;
protected int arc; protected int arc;
@NotNull @NotNull
@ -54,6 +56,8 @@ public class DarkTaskPaneUI extends MetalTaskPaneUI {
protected void installDefaults() { protected void installDefaults() {
borderColor = UIManager.getColor("TaskPane.borderColor"); borderColor = UIManager.getColor("TaskPane.borderColor");
arc = UIManager.getInt("TaskPane.arc"); arc = UIManager.getInt("TaskPane.arc");
collapsedIcon = UIManager.getIcon("TaskPane.collapsed.icon");
openIcon = UIManager.getIcon("TaskPane.open.icon");
super.installDefaults(); super.installDefaults();
} }
@ -172,7 +176,11 @@ public class DarkTaskPaneUI extends MetalTaskPaneUI {
final int y, final int width, final int height) { final int y, final int width, final int height) {
((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g.setColor(getPaintColor(group)); g.setColor(getPaintColor(group));
paintChevronControls(group, g, x, y, width, height); if (group.isCollapsed()) {
collapsedIcon.paintIcon(group, g, x, y);
} else {
openIcon.paintIcon(group, g, x, y);
}
((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF); ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF);
} }

0
src/main/resources/library/x64/jniplatform.dll → src/main/resources/com/github/weisj/darklaf/platform/windows/x64/jniplatform.dll

0
src/main/resources/library/x86/jniplatform.dll → src/main/resources/com/github/weisj/darklaf/platform/windows/x86/jniplatform.dll

1
src/main/resources/com/github/weisj/darklaf/properties/ui/borders.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/button.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/checkBox.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/colorChooser.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/comboBox.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/fileChooser.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/internalFrame.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/label.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/list.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/menu.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/menuBar.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/menuItem.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/optionPane.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/panel.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/popupMenu.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/progressBar.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/radioButton.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/rootPane.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/scrollBar.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/scrollPane.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/separator.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/slider.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/spinner.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/splitPane.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/statusBar.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/tabFrame.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/tabbedPane.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/table.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

4
src/main/resources/com/github/weisj/darklaf/properties/ui/taskPane.properties

@ -38,3 +38,7 @@ TaskPane.titleBackgroundGradientEnd = %widgetFillInactive
TaskPane.titleBackgroundGradientStart = %widgetFillInactive TaskPane.titleBackgroundGradientStart = %widgetFillInactive
TaskPaneContainer.background = %backgroundContainer TaskPaneContainer.background = %backgroundContainer
#Icons
TaskPane.collapsed.icon = navigation/arrowUp.svg[aware]
TaskPane.open.icon = navigation/arrowDown.svg[aware]

1
src/main/resources/com/github/weisj/darklaf/properties/ui/text.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/toggleButton.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/toolBar.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/toolTip.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/tree.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

1
src/main/resources/com/github/weisj/darklaf/properties/ui/tristate.properties

@ -1,3 +1,4 @@
# suppress inspection "UnusedProperty" for whole file
# #
# MIT License # MIT License
# #

Loading…
Cancel
Save