Browse Source

Hide slider tooltip label everywhere

arkon 3 năm trước cách đây
mục cha
commit
a56997e98c

+ 0 - 1
app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSlider.kt

@@ -13,7 +13,6 @@ class ReaderSlider @JvmOverloads constructor(
 ) : Slider(context, attrs) {
 
     init {
-        isTickVisible = false
         stepSize = 1f
         setLabelFormatter { value ->
             (value.toInt() + 1).toString()

+ 0 - 10
app/src/main/res/layout/reader_color_filter_settings.xml

@@ -44,8 +44,6 @@
             android:stepSize="1.0"
             android:valueTo="255.0"
             android:padding="8dp"
-            app:labelBehavior="gone"
-            app:tickVisible="false"
             app:layout_constraintEnd_toStartOf="@id/txt_color_filter_red_value"
             app:layout_constraintStart_toEndOf="@id/color_filter_symbols_barrier"
             app:layout_constraintTop_toBottomOf="@id/switch_color_filter" />
@@ -84,8 +82,6 @@
             android:stepSize="1.0"
             android:valueTo="255.0"
             android:padding="8dp"
-            app:labelBehavior="gone"
-            app:tickVisible="false"
             app:layout_constraintEnd_toStartOf="@id/txt_color_filter_green_value"
             app:layout_constraintStart_toEndOf="@id/color_filter_symbols_barrier"
             app:layout_constraintTop_toBottomOf="@id/slider_color_filter_red" />
@@ -124,8 +120,6 @@
             android:stepSize="1.0"
             android:valueTo="255.0"
             android:padding="8dp"
-            app:labelBehavior="gone"
-            app:tickVisible="false"
             app:layout_constraintEnd_toStartOf="@id/txt_color_filter_blue_value"
             app:layout_constraintStart_toEndOf="@id/color_filter_symbols_barrier"
             app:layout_constraintTop_toBottomOf="@id/slider_color_filter_green" />
@@ -164,8 +158,6 @@
             android:stepSize="1.0"
             android:valueTo="255.0"
             android:padding="8dp"
-            app:labelBehavior="gone"
-            app:tickVisible="false"
             app:layout_constraintEnd_toStartOf="@id/txt_color_filter_alpha_value"
             app:layout_constraintStart_toEndOf="@id/color_filter_symbols_barrier"
             app:layout_constraintTop_toBottomOf="@id/slider_color_filter_blue" />
@@ -251,8 +243,6 @@
             android:valueFrom="-75.0"
             android:valueTo="100.0"
             android:stepSize="1.0"
-            app:labelBehavior="gone"
-            app:tickVisible="false"
             app:layout_constraintEnd_toStartOf="@id/txt_brightness_seekbar_value"
             app:layout_constraintStart_toEndOf="@id/txt_brightness_seekbar_icon"
             app:layout_constraintTop_toBottomOf="@id/custom_brightness" />

+ 8 - 0
app/src/main/res/values/styles.xml

@@ -224,6 +224,14 @@
         <item name="elevationOverlayEnabled">@bool/elevationOverlayEnabled</item>
     </style>
 
+    <!--==============-->
+    <!--Widgets.Slider-->
+    <!--==============-->
+    <style name="Widget.Tachiyomi.Slider" parent="Widget.MaterialComponents.Slider">
+        <item name="labelBehavior">gone</item>
+        <item name="tickVisible">false</item>
+    </style>
+
 
     <!--================-->
     <!--Navigation Views-->

+ 1 - 0
app/src/main/res/values/themes.xml

@@ -67,6 +67,7 @@
         <item name="bottomNavigationStyle">@style/Widget.Tachiyomi.BottomNavigationView</item>
         <item name="navigationRailStyle">@style/Widget.Tachiyomi.NavigationRailView</item>
         <item name="switchStyle">@style/Widget.Tachiyomi.Switch</item>
+        <item name="sliderStyle">@style/Widget.Tachiyomi.Slider</item>
         <item name="elevationOverlayEnabled">false</item>
         <item name="lightSystemBarsOnPrimary">false</item>