* Fixed theme selection bug

* Change AdempiereLookAndFeel to extend Plastic3D instead of Plastic
* Remove redundant Plastic look and feel from the supported list since AdempiereLookAndFeel extend Plastic
* Fixed AdempiereLookAndFeel can't use standard PlasticTheme bug
* Make flat toolbar the default
* Improved painting after changing of look and feel or theme. Alternatively, logout after change of theme.
This commit is contained in:
Heng Sin Low 2006-11-29 07:53:39 +00:00
parent 73be1f688c
commit 25f20849ed
3 changed files with 12 additions and 3 deletions

View File

@ -907,6 +907,14 @@ public final class AEnv
{
if (updated.contains(f)) continue;
SwingUtilities.updateComponentTreeUI(f);
f.validate();
RepaintManager mgr = RepaintManager.currentManager(f);
Component childs[] = f.getComponents();
for (Component c : childs) {
if (c instanceof JComponent)
mgr.markCompletelyDirty((JComponent)c);
}
f.repaint();
updated.add(f);
}
}

View File

@ -149,7 +149,7 @@ public final class APanel extends CPanel
northPanel.setLayout(northLayout);
northLayout.setAlignment(FlowLayout.LEFT);
toolBar.putClientProperty("JToolBar.isRollover", Boolean.TRUE);
//toolBar.setBorderPainted(false);
toolBar.setBorderPainted(false);
northPanel.add(toolBar, null);
} // jbInit

View File

@ -559,8 +559,9 @@ public final class Preference extends CDialog
String sTheme = theme.getValue();
if (sTheme != null && sTheme.length() > 0 && !sTheme.equals(themeClass))
{
ValueNamePair plaf = new ValueNamePair(UIManager.getLookAndFeel().getName(),
UIManager.getLookAndFeel().getClass().getName());
ValueNamePair plaf = new ValueNamePair(
UIManager.getLookAndFeel().getClass().getName(),
UIManager.getLookAndFeel().getName());
AdempierePLAF.setPLAF(plaf, theme, true);
AEnv.updateUI();
}