Demo: new window icon

This commit is contained in:
Karl Tauber
2020-06-28 23:59:28 +02:00
parent 8d80176a79
commit df7f693cf4
5 changed files with 115 additions and 0 deletions

View File

@@ -27,6 +27,7 @@ import com.formdev.flatlaf.FlatLaf;
import com.formdev.flatlaf.demo.extras.*;
import com.formdev.flatlaf.demo.intellijthemes.*;
import com.formdev.flatlaf.extras.FlatSVGIcon;
import com.formdev.flatlaf.extras.SVGUtils;
import net.miginfocom.swing.*;
/**
@@ -49,6 +50,8 @@ class DemoFrame
updateFontMenuItems();
controlBar.initialize( this, tabbedPane );
setIconImages( SVGUtils.createWindowIconImages( "/com/formdev/flatlaf/demo/FlatLaf.svg" ) );
if( tabIndex >= 0 && tabIndex < tabbedPane.getTabCount() && tabIndex != tabbedPane.getSelectedIndex() )
tabbedPane.setSelectedIndex( tabIndex );
}

View File

@@ -0,0 +1,13 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16">
<defs>
<linearGradient id="flatlaf-a" x1="50%" x2="50%" y1="0%" y2="100%">
<stop offset="0%" stop-color="#DD6900"/>
<stop offset="100%" stop-color="#D45500"/>
</linearGradient>
</defs>
<g fill="none" fill-rule="evenodd">
<rect width="16" height="16" fill="url(#flatlaf-a)"/>
<polygon fill="#FFF" points="9 13 13 13 12.5 11.5 10.5 11.5 10.5 6.5 9 6"/>
<polygon fill="#FFF" points="4 12.5 4 3 9 3 8.5 4.5 5.5 4.5 5.5 7 7.5 7 7 8.5 5.5 8.5 5.5 12"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 583 B