Browse Source

REPORT-83259 & REPORT-83263 【最强控件】控件样式跟随主题&开放自定义

release/11.0
Bruce.Deng 2 years ago
parent
commit
7ea3ff94ec
  1. 19
      designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java

19
designer-base/src/main/java/com/fr/design/mainframe/theme/TemplateThemeBlock.java

@ -6,18 +6,11 @@ import com.fr.base.theme.TemplateThemeConfig;
import com.fr.base.theme.settings.ThemeThumbnail; import com.fr.base.theme.settings.ThemeThumbnail;
import com.fr.design.designer.IntervalConstants; import com.fr.design.designer.IntervalConstants;
import com.fr.design.file.HistoryTemplateListCache; import com.fr.design.file.HistoryTemplateListCache;
import com.fr.design.fun.TemplateThemePaneProvider;
import com.fr.design.gui.ilable.UILabel; import com.fr.design.gui.ilable.UILabel;
import com.fr.design.layout.FRGUIPaneFactory; import com.fr.design.layout.FRGUIPaneFactory;
import com.fr.design.mainframe.JTemplate; import com.fr.design.mainframe.JTemplate;
import com.fr.design.mainframe.theme.dialog.TemplateThemeProfileDialog; import com.fr.design.mainframe.theme.dialog.TemplateThemeProfileDialog;
import com.fr.event.Event;
import com.fr.event.EventDispatcher;
import com.fr.event.Listener;
import com.fr.general.IOUtils; import com.fr.general.IOUtils;
import com.fr.plugin.context.PluginContext;
import com.fr.plugin.injectable.PluginModule;
import com.fr.plugin.observer.PluginEventType;
import com.fr.stable.Constants; import com.fr.stable.Constants;
import com.fr.stable.StringUtils; import com.fr.stable.StringUtils;
@ -102,18 +95,6 @@ public class TemplateThemeBlock<T extends TemplateTheme> extends JPanel {
repaint(); repaint();
} }
}); });
initPluginListener();
}
private void initPluginListener() {
EventDispatcher.listen(PluginEventType.BeforeStop, new Listener<PluginContext>() {
@Override
public void on(Event event, PluginContext pluginContext) {
// 重置参数面板和控件主题样式
theme.setParamContainerStyle(null);
theme.setWidgetStyle(null);
}
}, pluginContext -> pluginContext.contain(PluginModule.ExtraDesign, TemplateThemePaneProvider.XML_TAG));
} }
private void initializePane() { private void initializePane() {

Loading…
Cancel
Save