Skip to content

Commit 3c7b143

Browse files
Improving responsiveness in Settings (FreeTubeApp#2694)
* Removing a `width:auto` which was overriding the width for a lot of .select-text * Making the general-settings component not overflow * Reducing margin in settings when window is narrow * Moving invidious instance tooltip to reduce overflow * Reducing the width of sliders to be 100% at maximum Before this change, the preset width `380px` could easily be wider than the window. * Reducing overflow in Theme Settings - Added breakpoint for theme `select`s - Added breakpoint for the UI scale slider * Reducing the remaining overflow in settings This moves all of the tooltips slightly to the left when the window is narrow to reduce overflow. * Expanding the sponsorblock settings to full width * Moving remaining tooltips into a fixed zone * Floating the tooltip icon to the right When the display is narrow, the tooltip can sometimes overflow, and it is very difficult to predict how it will overflow if the tool tip icon comes directly after a locale string. This change floats those icons into a centralized location where the tooltip can be guaranteed to not overflow. * Removing some irrelevant changes * Reducing margin on switches * Removing bottom margin on the last section * Making room for overflow ellipsis * Adding class `.containsTooltip` to `ft-toggle` This should make is easier to style the toggles which contain tooltips specficially. * Modifying the media query for tooltips * Adding a media query to reduce data settings margin
1 parent 3af6dd7 commit 3c7b143

File tree

6 files changed

+67
-5
lines changed

6 files changed

+67
-5
lines changed

src/renderer/components/ft-select/ft-select.css

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
font-family: inherit;
3939
background-color: transparent;
4040
color: var(--primary-text-color);
41-
width: 200px;
41+
width: 240px;
4242
padding: 10px 10px 10px 0;
4343
font-size: 18px;
4444
border-radius: 0;
@@ -143,3 +143,26 @@
143143
pointer-events: none;
144144
opacity: 0.5;
145145
}
146+
147+
@media only screen and (max-width: 1000px) {
148+
.select .select-text {
149+
max-width: 240px;
150+
}
151+
}
152+
153+
@media only screen and (max-width: 800px) {
154+
.select {
155+
width: 100%;
156+
}
157+
.select .select-text {
158+
display:block;
159+
max-width: 95%;
160+
}
161+
}
162+
163+
@media only screen and (max-width: 680px) {
164+
.select {
165+
padding: 0px;
166+
margin-right: -15px;
167+
}
168+
}

src/renderer/components/ft-settings-section/ft-settings-section.sass

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@
22
background-color: var(--card-bg-color)
33
width: 85%
44
margin: 0 auto
5+
@media only screen and (max-width: 800px)
6+
width: 100%
57

68
&[open]
79
padding-bottom: 15px
810

9-
@media only screen and (max-width: 680px)
10-
width: 90%
11+
> div
12+
width: 100%
13+
padding: 0px 20px
14+
box-sizing: border-box
15+
> div:not(:last-child):not(.ft-flex-box)
16+
@media only screen and (max-width: 800px)
17+
margin-bottom: 20px
1118

1219
.sectionLine
1320
width: 100%
@@ -52,3 +59,24 @@
5259
@media only screen and (max-width: 500px)
5360
:deep(.settingsFlexStart500px)
5461
justify-content: flex-start
62+
63+
@media only screen and (max-width: 680px)
64+
.settingsSection
65+
> div
66+
:deep(.text.bottom)
67+
left: -85px
68+
:deep(.switch-ctn.containsTooltip)
69+
left: -10px
70+
margin-right: 5px
71+
padding: 0px 10px 0px 10px
72+
:not(.select)
73+
> :deep(.tooltip)
74+
display: inline-block
75+
position: absolute
76+
right: -25px
77+
top: 12px
78+
.settingsFlexStart460px :deep(.tooltip)
79+
right: 0px
80+
top: -2px
81+
:deep(.switch-ctn)
82+
margin: 10px 7px

src/renderer/components/ft-slider/ft-slider.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,3 +242,9 @@
242242
box-shadow: 0 0 0 1px rgb(var(--pure-material-surface-rgb, 255, 255, 255)) !important;
243243
transform: scale(4, 4);
244244
}
245+
246+
@media only screen and (max-width: 680px) {
247+
.pure-material-slider {
248+
width: 100%;
249+
}
250+
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.sponsorBlockCategory
22
margin-top: 30px
33
padding: 0 10px
4+
@media only screen and (max-width: 680px)
5+
width: 100%
46
.sponsorTitle
57
font-size: x-large

src/renderer/components/ft-toggle-switch/ft-toggle-switch.sass

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,6 @@
7676

7777
.switch-input:disabled + &
7878
background-color: #BDBDBD
79-
79+
80+
@media (max-width: 680px)
81+
max-width: 250px

src/renderer/components/ft-toggle-switch/ft-toggle-switch.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
class="switch-ctn"
44
:class="{
55
compact,
6-
disabled: disabled
6+
disabled: disabled,
7+
containsTooltip: tooltip.length > 0
78
}"
89
>
910
<input

0 commit comments

Comments
 (0)