Browse Source

Pull request #13252: REPORT-107973 主页及组件视觉样式翻新

Merge in DESIGN/design from ~LEO.QIN/design:newui to newui

* commit '94cade143d76e46729ee95475a5c2e15f3fec3da':
  REPORT-107973 主页及组件视觉样式翻新 改下名字
  REPORT-107973 主页及组件视觉样式翻新 改下名字
  REPORT-107973 主页及组件视觉样式翻新 【问题原因】rt 【改动思路】翻新北区菜单栏
newui
Leo.Qin-覃宇攀 12 months ago
parent
commit
5619d3df58
  1. 5
      designer-base/src/main/java/com/fine/theme/light/ui/FineLightIconSet.java
  2. 3
      designer-base/src/main/java/com/fr/design/gui/imenu/UIHeadMenu.java
  3. 2
      designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java
  4. 5
      designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java
  5. 8
      designer-base/src/main/resources/com/fine/theme/icon/notification/notification.svg
  6. 10
      designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties
  7. 4
      designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java
  8. 24
      designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java

5
designer-base/src/main/java/com/fine/theme/light/ui/FineLightIconSet.java

@ -131,7 +131,10 @@ public class FineLightIconSet extends AbstractIconSet {
new SvgIconSource("sub_report", "com/fine/theme/icon/insert/sub_report.svg", true),
new SvgIconSource("chart_line", "com/fine/theme/icon/chart/chart_line.svg", true),
new SvgIconSource("popup", "com/fine/theme/icon/popup/popup.svg", true),
new SvgIconSource("clear", "com/fine/theme/icon/clear.svg", true)
new SvgIconSource("clear", "com/fine/theme/icon/clear.svg", true),
// 北区菜单栏
new SvgIconSource("notification", "com/fine/theme/icon/notification/notification.svg")
);
}

3
designer-base/src/main/java/com/fr/design/gui/imenu/UIHeadMenu.java

@ -5,6 +5,7 @@ import javax.swing.JButton;
import javax.swing.JMenuItem;
import javax.swing.JPopupMenu;
import javax.swing.MenuElement;
import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;
import java.awt.Component;
@ -17,7 +18,7 @@ public class UIHeadMenu extends UIMenu {
public UIHeadMenu(String name) {
super(name);
setBorder(new EmptyBorder(5,14,5,14));
setBorder(new EmptyBorder(UIManager.getInsets("HeadMenu.borderMargins")));
}
@Override

2
designer-base/src/main/java/com/fr/design/mainframe/loghandler/LogMessageBar.java

@ -5,6 +5,7 @@ import com.fr.stable.StringUtils;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.UIManager;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.MouseAdapter;
@ -40,6 +41,7 @@ public class LogMessageBar extends JPanel {
messageLabel = new UILabel();
setLayout(new BorderLayout());
add(messageLabel, BorderLayout.CENTER);
messageLabel.setForeground(UIManager.getColor("color.text.placeholder"));
addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {

5
designer-base/src/main/java/com/fr/design/notification/ui/NotificationCenterPane.java

@ -1,5 +1,6 @@
package com.fr.design.notification.ui;
import com.fine.theme.icon.LazyIcon;
import com.fr.base.svg.IconUtils;
import com.fr.design.dialog.BasicPane;
import com.fr.design.gui.ibutton.UIButton;
@ -20,7 +21,7 @@ public class NotificationCenterPane extends BasicPane {
setPreferredSize(new Dimension(24, 24));
setLayout(new BorderLayout());
notificationCenterButton = new UIButton();
notificationCenterButton.setIcon(IconUtils.readIcon("/com/fr/design/standard/notification/notification"));
notificationCenterButton.setIcon(new LazyIcon("notification"));
notificationCenterButton.setToolTipText(Toolkit.i18nText("Fine-Design_Basic_Show_Notification"));
notificationCenterButton.set4ToolbarButton();
notificationCenterButton.setRolloverEnabled(false);
@ -42,7 +43,7 @@ public class NotificationCenterPane extends BasicPane {
if (NotificationCenter.getInstance().getNotificationsCount() > 0) {
notificationCenterButton.setIcon(IconUtils.readIcon("/com/fr/design/standard/notification/notification_dot.svg"));
} else {
notificationCenterButton.setIcon(IconUtils.readIcon("/com/fr/design/standard/notification/notification"));
notificationCenterButton.setIcon(new LazyIcon("notification"));
}
}

8
designer-base/src/main/resources/com/fine/theme/icon/notification/notification.svg

@ -0,0 +1,8 @@
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M24.9955 13L24.9954 23.5H6.99544L6.99548 13C6.99548 8.02944 11.0249 4 15.9955 4C20.966 4 24.9955 8.02944 24.9955 13ZM4.99544 23.5L4.99548 13C4.99548 6.92487 9.92035 2 15.9955 2C22.0706 2 26.9955 6.92487 26.9955 13L26.9954 23.5L28.0251 24.6696C28.3095 24.9926 28.0802 25.5 27.6499 25.5H26.9954H24.9954H6.99544H4.99544H4.3408C3.9105 25.5 3.68118 24.9926 3.96553 24.6696L4.99544 23.5Z"
fill="#0A1C38" fill-opacity="0.9"/>
<path fill-rule="evenodd" clip-rule="evenodd"
d="M11.126 27.5C12.2152 29.0141 13.9924 30 15.9999 30C18.0075 30 19.7847 29.0141 20.8739 27.5H11.126Z"
fill="#0A1C38" fill-opacity="0.9"/>
</svg>

After

Width:  |  Height:  |  Size: 804 B

10
designer-base/src/main/resources/com/fine/theme/light/ui/laf/FineLightLaf.properties

@ -89,6 +89,10 @@ ViewportUI = com.formdev.flatlaf.ui.FlatViewportUI
#---- variables ----
color.brand.normal=#2576EF
color.text.white=#ffffff
color.text.placeholder=#0A1C3878
# general background and foreground (text color)
@background = #F6F8FA
@ -981,6 +985,8 @@ ToggleButton.toolbar.selectedBackground = $ToggleButton.selectedBackground
#---- HeadGroup ----
HeadGroup.background= #E9ECF1
HeadGroup.arc= $Component.arc
#---- HeadMenu ----
HeadMenu.borderMargins=5,9,5,10
#---- ToolBar ----
@ -1071,6 +1077,10 @@ South.SheetIconSepDistance = 16
South.SheetBarHeight = 24
South.SheetAddWidth = 6
South.SheetIconGap = 5
#---- North ----
North.userinfoLabel.borderMargins=2, 16, 2, 16
North.userinfoLabel.width=80
North.userinfoLabel.height=24
#---- Styles ------------------------------------------------------------------

4
designer-realize/src/main/java/com/fr/design/mainframe/alphafine/component/AlphaFinePane.java

@ -1,6 +1,6 @@
package com.fr.design.mainframe.alphafine.component;
import com.fr.base.svg.IconUtils;
import com.fine.theme.icon.LazyIcon;
import com.fr.design.actions.help.alphafine.AlphaFineContext;
import com.fr.design.actions.help.alphafine.AlphaFineListener;
import com.fr.design.dialog.BasicPane;
@ -28,7 +28,7 @@ public class AlphaFinePane extends BasicPane {
setPreferredSize(new Dimension(24, 24));
setLayout(new BorderLayout());
UIButton refreshButton = new UIButton();
refreshButton.setIcon(IconUtils.readIcon(("/com/fr/design/standard/smallsearch")));
refreshButton.setIcon(new LazyIcon(("search")));
refreshButton.setToolTipText(com.fr.design.i18n.Toolkit.i18nText("Fine-Design_Report_AlphaFine_Learn_More_About"));
refreshButton.set4ToolbarButton();
refreshButton.setRolloverEnabled(false);

24
designer-realize/src/main/java/com/fr/design/mainframe/bbs/UserInfoPane.java

@ -6,7 +6,6 @@ package com.fr.design.mainframe.bbs;
import com.fr.base.FRContext;
import com.fr.concurrent.NamedThreadFactory;
import com.fr.design.DesignerEnvManager;
import com.fr.design.constants.UIConstants;
import com.fr.design.dialog.BasicPane;
import com.fr.design.mainframe.DesignerContext;
import com.fr.design.upm.event.CertificateEvent;
@ -17,9 +16,11 @@ import com.fr.general.DateUtils;
import com.fr.log.FineLoggerFactory;
import com.fr.stable.StringUtils;
import javax.swing.BorderFactory;
import javax.swing.UIManager;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Insets;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
@ -33,15 +34,6 @@ import java.util.concurrent.Executors;
* @date: 2015-3-5-上午11:19:50
*/
public class UserInfoPane extends BasicPane {
/**
* 默认未登录颜色
*/
private static final Color UN_LOGIN_BACKGROUND = UIConstants.DESIGNER_LOGIN_BACKGROUND;
private static final Color LOGIN_BACKGROUND = new Color(184, 220, 242);
private static final int WIDTH = 104;
private static final int HEIGHT = 24;
/**
* 登录成功
*/
@ -70,10 +62,12 @@ public class UserInfoPane extends BasicPane {
* 构造函数
*/
private UserInfoPane() {
this.setPreferredSize(new Dimension(WIDTH, HEIGHT));
this.setPreferredSize(new Dimension(UIManager.getInt("North.userinfoLabel.width"), UIManager.getInt("North.userinfoLabel.height")));
this.setLayout(new BorderLayout());
this.userInfoLabel = new UserInfoLabel(this);
Insets insets = UIManager.getInsets("North.userinfoLabel.borderMargins");
this.userInfoLabel.setBorder(BorderFactory.createEmptyBorder(insets.top, insets.left, insets.bottom, insets.right));
this.markUnSignIn();
autoPushLoginDialog();
@ -108,9 +102,9 @@ public class UserInfoPane extends BasicPane {
*/
public void markUnSignIn() {
this.userInfoLabel.setText(com.fr.design.i18n.Toolkit.i18nText("Fine-Designer_Login_Onclick"));
this.userInfoLabel.setForeground(Color.WHITE);
this.userInfoLabel.setForeground(UIManager.getColor("color.text.white"));
this.userInfoLabel.setOpaque(true);
this.userInfoLabel.setBackground(UN_LOGIN_BACKGROUND);
this.userInfoLabel.setBackground(UIManager.getColor("color.brand.normal"));
this.userInfoLabel.resetUserName();
}
@ -121,10 +115,8 @@ public class UserInfoPane extends BasicPane {
*/
public void markSignIn(String userName) {
this.userInfoLabel.setText(userName);
this.userInfoLabel.setForeground(Color.BLACK);
this.userInfoLabel.setUserName(userName);
this.userInfoLabel.setOpaque(true);
this.userInfoLabel.setBackground(LOGIN_BACKGROUND);
}
@Override

Loading…
Cancel
Save