From 91cfbba1204822e3ad55125ecbc43278dab0de4a Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Wed, 29 Nov 2006 07:53:56 +0000 Subject: [PATCH] * 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. --- dbPort/src/org/compiere/util/Env.java | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/dbPort/src/org/compiere/util/Env.java b/dbPort/src/org/compiere/util/Env.java index 960ecc93ce..5ea53b6183 100644 --- a/dbPort/src/org/compiere/util/Env.java +++ b/dbPort/src/org/compiere/util/Env.java @@ -23,6 +23,7 @@ import java.sql.*; import java.util.*; import java.util.logging.*; import javax.swing.*; + import org.compiere.*; import org.compiere.db.*; import org.compiere.model.*; @@ -1441,13 +1442,29 @@ public final class Env Window w = getFrame(c); if (w == null) continue; if (updated.contains(w)) continue; - SwingUtilities.updateComponentTreeUI(c); + SwingUtilities.updateComponentTreeUI(w); + w.validate(); + RepaintManager mgr = RepaintManager.currentManager(w); + Component childs[] = w.getComponents(); + for (Component child : childs) { + if (child instanceof JComponent) + mgr.markCompletelyDirty((JComponent)child); + } + w.repaint(); updated.add(w); } for (Window w : s_hiddenWindows) { if (updated.contains(w)) continue; SwingUtilities.updateComponentTreeUI(w); + w.validate(); + RepaintManager mgr = RepaintManager.currentManager(w); + Component childs[] = w.getComponents(); + for (Component child : childs) { + if (child instanceof JComponent) + mgr.markCompletelyDirty((JComponent)child); + } + w.repaint(); updated.add(w); } return updated;