修改一些界面样式
This commit is contained in:
parent
55db993b22
commit
7a569687e4
@ -11,6 +11,8 @@ import java.awt.*;
|
||||
*/
|
||||
public class WPanel extends JPanel {
|
||||
|
||||
private boolean drawBoder = true;
|
||||
|
||||
public WPanel(LayoutManager layout, boolean isDoubleBuffered) {
|
||||
super(layout, isDoubleBuffered);
|
||||
this.setOpaque(false);
|
||||
@ -27,14 +29,27 @@ public class WPanel extends JPanel {
|
||||
|
||||
public WPanel() {
|
||||
this(true);
|
||||
this.setBorder(BorderFactory.createEmptyBorder(3, 3, 3, 3));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void paintComponent(Graphics g) {
|
||||
Graphics2D g2 = (Graphics2D) g.create();
|
||||
g2.setColor(UIManager.getColor("App.background"));
|
||||
Insets insets= getInsets();
|
||||
g2.fillRect(0,0,getWidth(),getHeight());
|
||||
g2.fillRect(0, 0, getWidth(), getHeight());
|
||||
if (isDrawBoder()) {
|
||||
g2.setColor(UIManager.getColor("App.borderColor"));
|
||||
g2.drawRect(1, 1, getWidth() - 2, getHeight() - 2);
|
||||
|
||||
}
|
||||
g2.dispose();
|
||||
}
|
||||
|
||||
public boolean isDrawBoder() {
|
||||
return drawBoder;
|
||||
}
|
||||
|
||||
public void setDrawBoder(boolean drawBoder) {
|
||||
this.drawBoder = drawBoder;
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ public class MainTabbedPaneUI extends FlatJideTabbedPaneUI {
|
||||
|
||||
@Override
|
||||
public void paintBackground(Graphics g, Component c) {
|
||||
g.setColor(UIManager.getColor("TabbedPane.background"));
|
||||
// g.setColor(UIManager.getColor("TabbedPane.background"));
|
||||
super.paintBackground(g, c);
|
||||
Graphics2D g2 = (Graphics2D) g.create();
|
||||
|
||||
|
@ -142,7 +142,7 @@ public class MainFrame extends JFrame {
|
||||
protected void paintComponent(Graphics g) {
|
||||
Graphics2D g2 = (Graphics2D) g.create();
|
||||
if (StrUtil.equals(UIManager.getLookAndFeel().getName(), DarkTheme.NAME)) {
|
||||
g2.setColor(UIManager.getColor("App.background"));
|
||||
g2.setColor(UIManager.getColor("App.mainPaneBackground"));
|
||||
g2.fillRect(0, 0, getWidth(), getHeight());
|
||||
} else if (StrUtil.equals(UIManager.getLookAndFeel().getName(), LightTheme.NAME)) {
|
||||
g2.drawImage(getBackgroundImageLight(), 0, 0, getWidth(), getHeight(), this);
|
||||
|
@ -42,6 +42,7 @@ public class SidePane extends WPanel implements Observer {
|
||||
initListeners();
|
||||
initData();
|
||||
AppStore.getMenuRefreshObservable().addObserver(this);
|
||||
setDrawBoder(false);
|
||||
}
|
||||
|
||||
private void initComponents() {
|
||||
|
@ -54,7 +54,8 @@ app-gray-color-7:#919aae
|
||||
app-gray-color-8:#737d92
|
||||
app-gray-color-9:#5a6477
|
||||
app-gray-color-10:#424b5e
|
||||
App.background=darken(@background,5%)
|
||||
App.mainPaneBackground=darken(@background,8%)
|
||||
App.background=@background
|
||||
App.accentColor=@accentBaseColor
|
||||
App.titleBarBackground=@background
|
||||
App.titleBarForeground=@foreground
|
||||
@ -86,6 +87,7 @@ TabbedPane.tabHeight=45
|
||||
TabbedPane.hoverColor=fade(@accentColor,25%)
|
||||
TabbedPane.font=bold
|
||||
TabbedPane.tabSelectionHeight=4
|
||||
|
||||
Tree.rowHeight=50
|
||||
TabbedPane.selectedBackground=fade(@accentColor,40%)
|
||||
TabbedPane.showTabSeparators=false
|
||||
|
@ -72,6 +72,7 @@ App.tabbedPaneHeardBackground=#0006
|
||||
App.hoverBackground=#005d74
|
||||
App.borderColor=#fff3
|
||||
App.background=#0006
|
||||
App.mainPaneBackground=#0006
|
||||
|
||||
Button.default.foreground = #ffff
|
||||
Button.default.background = #fff3
|
||||
|
@ -64,6 +64,7 @@ app-gray-color-9: #5a6477
|
||||
app-gray-color-10: #424b5e
|
||||
|
||||
|
||||
App.mainPaneBackground=@background
|
||||
App.background=@background
|
||||
App.accentColor=@accentBaseColor
|
||||
App.titleBarBackground=@background
|
||||
|
Loading…
x
Reference in New Issue
Block a user