Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Improve visibility of font size chooser #6988

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions res/css/views/elements/_Slider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,23 @@ limitations under the License.

.mx_Slider_selectionDot {
position: absolute;
width: 1.1em;
height: 1.1em;
width: 2.39em;
height: 2.39em;
andybalaam marked this conversation as resolved.
Show resolved Hide resolved
background-color: $slider-selection-color;
border-radius: 50%;
box-shadow: 0 0 6px lightgrey;
z-index: 10;
}

.mx_Slider_selectionText {
color: $muted-fg-color;
font-size: 145%;
andybalaam marked this conversation as resolved.
Show resolved Hide resolved
position: relative;
text-align: center;
top: 2.0em;
andybalaam marked this conversation as resolved.
Show resolved Hide resolved
width: 100%;
}

.mx_Slider_selection > hr {
margin: 0;
border: 0.2em solid $slider-selection-color;
Expand Down
5 changes: 4 additions & 1 deletion res/css/views/settings/_FontScalingPanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ limitations under the License.
display: flex;
flex-direction: row;
align-items: center;
padding: 15px;
padding-bottom: 35px;
padding-left: 15px;
padding-right: 15px;
padding-top: 15px;
andybalaam marked this conversation as resolved.
Show resolved Hide resolved
background: rgba($appearance-tab-border-color, 0.2);
border-radius: 10px;
font-size: 10px;
Expand Down
4 changes: 3 additions & 1 deletion src/components/views/elements/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,9 @@ export default class Slider extends React.Component<IProps> {
if (!this.props.disabled) {
const offset = this.offset(this.props.values, this.props.value);
selection = <div className="mx_Slider_selection">
<div className="mx_Slider_selectionDot" style={{ left: "calc(-0.55em + " + offset + "%)" }} />
<div className="mx_Slider_selectionDot" style={{ left: "calc(-1.195em + " + offset + "%)" }}>
<div className="mx_Slider_selectionText">{ this.props.value }</div>
</div>
<hr style={{ width: offset + "%" }} />
</div>;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,16 @@ exports[`FontScalingPanel renders the font scaling UI 1`] = `
className="mx_Slider_selectionDot"
style={
Object {
"left": "calc(-0.55em + 50%)",
"left": "calc(-1.195em + 50%)",
}
}
/>
>
<div
className="mx_Slider_selectionText"
>
15
</div>
</div>
<hr
style={
Object {
Expand Down