mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Styling for the font slider
This commit is contained in:
parent
f5d6590751
commit
fe175bb9a8
2 changed files with 32 additions and 6 deletions
|
@ -14,7 +14,27 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
.mx_AppearanceUserSettingsTab_fontSlider,
|
||||
.mx_AppearanceUserSettingsTab_themeSection .mx_Field,
|
||||
.mx_AppearanceUserSettingsTab_fontScaling .mx_Field {
|
||||
@mixin mx_Settings_fullWidthField;
|
||||
}
|
||||
|
||||
.mx_AppearanceUserSettingsTab_fontSlider {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
background: #FFFFFF;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
.mx_AppearanceUserSettingsTab_fontSlider_smallText {
|
||||
font-size: 15px;
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
.mx_AppearanceUserSettingsTab_fontSlider_largeText {
|
||||
font-size: 18px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ import Field from "../../../elements/Field";
|
|||
import Slider from "../../../elements/Slider";
|
||||
import AccessibleButton from "../../../elements/AccessibleButton";
|
||||
import dis from "../../../../../dispatcher";
|
||||
import _range from "lodash/range";
|
||||
|
||||
export default class StyleUserSettingsTab extends React.Component {
|
||||
constructor() {
|
||||
|
@ -225,12 +226,17 @@ export default class StyleUserSettingsTab extends React.Component {
|
|||
_renderFontSection() {
|
||||
return <div className="mx_SettingsTab_section mx_AppearanceUserSettingsTab_fontScaling">
|
||||
<span className="mx_SettingsTab_subheading">{_t("Font size")}</span>
|
||||
<Slider
|
||||
values={[12, 14, 16, 18, 20]}
|
||||
value={this.state.fontSize}
|
||||
onSelectionChange={this._onFontSizeChanged}
|
||||
displayFunc={value => {}}
|
||||
/>
|
||||
<div className="mx_AppearanceUserSettingsTab_fontSlider">
|
||||
<div className="mx_AppearanceUserSettingsTab_fontSlider_smallText">Aa</div>
|
||||
<Slider
|
||||
values={_range(SettingsStore.getValue("font_size_min"), SettingsStore.getValue("font_size_max"), 2)}
|
||||
value={this.state.fontSize}
|
||||
onSelectionChange={this._onFontSizeChanged}
|
||||
displayFunc={value => {}}
|
||||
disabled={false}
|
||||
/>
|
||||
<div className="mx_AppearanceUserSettingsTab_fontSlider_largeText">Aa</div>
|
||||
</div>
|
||||
<Field
|
||||
type="text"
|
||||
label={_t("Font size")}
|
||||
|
|
Loading…
Reference in a new issue