fix(fe): fix incorrect chinses font

This commit is contained in:
hexxa 2022-03-19 19:14:04 +08:00 committed by Hexxa
parent c8c7450583
commit f5717b05b1
6 changed files with 48 additions and 44 deletions

View file

@ -244,6 +244,10 @@
margin: 3rem auto 8rem auto; margin: 3rem auto 8rem auto;
} }
.theme-dark .tabs button {
padding: 0.5rem 1rem;
}
/* +composition */ /* +composition */
.theme-dark .container { .theme-dark .container {

View file

@ -241,6 +241,10 @@
margin: 3rem auto 8rem auto; margin: 3rem auto 8rem auto;
} }
.theme-default .tabs button {
padding: 0.5rem 1rem;
}
/* +composition */ /* +composition */
.theme-default .container { .theme-default .container {

View file

@ -64,18 +64,13 @@ export class Tabs extends React.Component<Props, State, {}> {
}} }}
className="float-l margin-r-m minor-bg" className="float-l margin-r-m minor-bg"
> >
<Flexbox <div className="float-l icon-s margin-r-s">{icon}</div>
children={List([ <div className={`float-l font-s ${fontColor}`}>
<span>{titleIcon}</span>,
<span className="margin-r-s">{icon}</span>,
<span className={fontColor}>
{this.props.msg.pkg.get( {this.props.msg.pkg.get(
`control.${this.props.targetControl}.${option}` `control.${this.props.targetControl}.${option}`
)} )}
</span>, </div>
])} <div className="fix"></div>
childrenStyles={List([{}, {}, {}])}
/>
</button> </button>
); );
}); });

View file

@ -97,13 +97,14 @@ export class Layers extends React.Component<Props, State, {}> {
<div id="settings-layer" className={`layer ${showSettings}`}> <div id="settings-layer" className={`layer ${showSettings}`}>
<div id="root-container"> <div id="root-container">
<Container> <Container>
<Flexbox <div className="col-l">
children={List([
<Title <Title
title={this.props.msg.pkg.get("pane.settings")} title={this.props.msg.pkg.get("pane.settings")}
iconColor="major" iconColor="major"
iconName="RiListSettingsFill" iconName="RiListSettingsFill"
/>, />
</div>
<div className="col-r">
<button <button
className="button-default" className="button-default"
onClick={() => { onClick={() => {
@ -111,10 +112,9 @@ export class Layers extends React.Component<Props, State, {}> {
}} }}
> >
{this.props.msg.pkg.get("panes.close")} {this.props.msg.pkg.get("panes.close")}
</button>, </button>
])} </div>
childrenStyles={List([{}, { justifyContent: "flex-end" }])} <div className="fix"></div>
/>
</Container> </Container>
<SettingsDialog <SettingsDialog

View file

@ -5,7 +5,7 @@ import { ICoreState, MsgProps, UIProps } from "./core_state";
import { FilesPanel, FilesProps } from "./panel_files"; import { FilesPanel, FilesProps } from "./panel_files";
import { UploadingsPanel, UploadingsProps } from "./panel_uploadings"; import { UploadingsPanel, UploadingsProps } from "./panel_uploadings";
import { SharingsPanel, SharingsProps } from "./panel_sharings"; import { SharingsPanel, SharingsProps } from "./panel_sharings";
import { IconProps } from "./visual/icons"; import { IconProps, iconSize } from "./visual/icons";
import { Tabs } from "./control/tabs"; import { Tabs } from "./control/tabs";
import { LoginProps } from "./pane_login"; import { LoginProps } from "./pane_login";
import { Layers } from "./layers"; import { Layers } from "./layers";
@ -89,17 +89,17 @@ export class RootFrame extends React.Component<Props, State, {}> {
tabIcons={Map<string, IconProps>({ tabIcons={Map<string, IconProps>({
filesPanel: { filesPanel: {
name: "RiFolder2Fill", name: "RiFolder2Fill",
size: "1.6rem", size: iconSize("s"),
color: "focus", color: "focus",
}, },
uploadingsPanel: { uploadingsPanel: {
name: "RiUploadCloudFill", name: "RiUploadCloudFill",
size: "1.6rem", size: iconSize("s"),
color: "focus", color: "focus",
}, },
sharingsPanel: { sharingsPanel: {
name: "RiShareBoxLine", name: "RiShareBoxLine",
size: "1.6rem", size: iconSize("s"),
color: "focus", color: "focus",
}, },
})} })}

View file

@ -2,7 +2,7 @@ import * as React from "react";
import { List } from "immutable"; import { List } from "immutable";
import { Flexbox } from "../layout/flexbox"; import { Flexbox } from "../layout/flexbox";
import { getIconWithProps } from "./icons"; import { getIconWithProps, iconSize } from "./icons";
import { colorClass } from "./colors"; import { colorClass } from "./colors";
export interface Props { export interface Props {
@ -15,15 +15,16 @@ export const Title = (props: Props) => {
return ( return (
<Flexbox <Flexbox
children={List([ children={List([
<Flexbox <div>
children={List([ <div className="float-l icon-l">
getIconWithProps(props.iconName, { {getIconWithProps(props.iconName, {
size: "3.2rem", size: iconSize("l"),
className: `margin-r-m ${colorClass(props.iconColor)}-font`, className: `margin-r-m ${colorClass(props.iconColor)}-font`,
}), })}
<span className="title-m bold">{props.title}</span>, </div>
])} <div className="title-m float-l bold">{props.title}</div>
/>, <div className="fix"></div>
</div>,
<span></span>, <span></span>,
])} ])}