mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
SPARK-1258
DISABLE_EXIT DISABLE_GROUP_ADD SPARK-1257 when changing from JavaDefault to Substance redecorate Titlebars (note that not all JavaDefaultSkins support this fully(e.g. cde/motif), restart in that case corrected loading of Metal,Nimbus and CDE/Motif git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12162 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
committed by
wolf.posdorfer
parent
c97166a9f2
commit
78f8e6435a
@ -211,17 +211,15 @@ public final class Spark {
|
||||
private void loadLookAndFeel() {
|
||||
final LocalPreferences preferences = SettingsManager.getLocalPreferences();
|
||||
final String laf;
|
||||
if(Default.getString(Default.DEFAULT_LOOK_AND_FEEL).length()>0)
|
||||
{
|
||||
if (Default.getString(Default.DEFAULT_LOOK_AND_FEEL).length() > 0) {
|
||||
laf = Default.getString(Default.DEFAULT_LOOK_AND_FEEL);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else if (preferences.getLookAndFeel().length() > 0) {
|
||||
laf = preferences.getLookAndFeel();
|
||||
} else {
|
||||
laf = UIManager.getSystemLookAndFeelClassName();
|
||||
}
|
||||
|
||||
try {
|
||||
String classname = UIManager.getSystemLookAndFeelClassName();
|
||||
if (laf.toLowerCase().contains("substance")) {
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
public void run() {
|
||||
@ -239,7 +237,12 @@ public final class Spark {
|
||||
});
|
||||
} else {
|
||||
try {
|
||||
UIManager.setLookAndFeel(classname);
|
||||
if(Spark.isWindows()) {
|
||||
JFrame.setDefaultLookAndFeelDecorated(true);
|
||||
JDialog.setDefaultLookAndFeelDecorated(true);
|
||||
}
|
||||
UIManager.setLookAndFeel(laf);
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
Reference in New Issue
Block a user