Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit a110c6e

Browse files
MortimerGorophilip-lamb
authored andcommitted
Improve separator lines quality. (#1377)
1 parent 3cf5764 commit a110c6e

File tree

10 files changed

+40
-39
lines changed

10 files changed

+40
-39
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:shape="rectangle">
4+
<stroke android:color="@color/iron_blur" android:width="0.5dp" />
5+
<solid android:color="@color/iron"/>
6+
</shape>

app/src/main/res/layout/options_controller.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@
2626

2727
<View
2828
android:id="@+id/separatorTop"
29+
style="?attr/separatorStyle"
2930
android:layout_width="match_parent"
30-
android:layout_height="0.5dp"
3131
android:layout_below="@+id/backButton"
32-
android:layout_marginBottom="10dp"
33-
android:background="@color/iron" />
32+
android:layout_marginBottom="10dp" />
3433

3534
<ScrollView
3635
android:id="@+id/scrollbar"
@@ -66,12 +65,11 @@
6665

6766
<View
6867
android:id="@+id/separatorBottom"
68+
style="?attr/separatorStyle"
6969
android:layout_width="match_parent"
70-
android:layout_height="0.5dp"
7170
android:layout_above="@+id/resetButton"
7271
android:layout_marginTop="10dp"
73-
android:layout_marginBottom="10dp"
74-
android:background="@color/iron" />
72+
android:layout_marginBottom="10dp" />
7573

7674
<org.mozilla.vrbrowser.ui.views.settings.ButtonSetting
7775
android:id="@+id/resetButton"

app/src/main/res/layout/options_developer.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@
2626

2727
<View
2828
android:id="@+id/separatorTop"
29+
style="?attr/separatorStyle"
2930
android:layout_width="match_parent"
30-
android:layout_height="0.5dp"
3131
android:layout_below="@+id/backButton"
32-
android:layout_marginBottom="10dp"
33-
android:background="@color/iron" />
32+
android:layout_marginBottom="10dp" />
3433

3534
<ScrollView
3635
android:id="@+id/scrollbar"
@@ -83,12 +82,11 @@
8382

8483
<View
8584
android:id="@+id/separatorBottom"
85+
style="?attr/separatorStyle"
8686
android:layout_width="match_parent"
87-
android:layout_height="0.5dp"
8887
android:layout_above="@+id/resetButton"
8988
android:layout_marginTop="10dp"
90-
android:layout_marginBottom="10dp"
91-
android:background="@color/iron" />
89+
android:layout_marginBottom="10dp" />
9290

9391
<org.mozilla.vrbrowser.ui.views.settings.ButtonSetting
9492
android:id="@+id/resetButton"

app/src/main/res/layout/options_display.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@
2626

2727
<View
2828
android:id="@+id/separatorTop"
29+
style="?attr/separatorStyle"
2930
android:layout_width="match_parent"
30-
android:layout_height="0.5dp"
3131
android:layout_below="@+id/backButton"
32-
android:layout_marginBottom="10dp"
33-
android:background="@color/iron" />
32+
android:layout_marginBottom="10dp" />
3433

3534
<ScrollView
3635
android:id="@+id/scrollbar"
@@ -131,12 +130,11 @@
131130

132131
<View
133132
android:id="@+id/separatorBottom"
133+
style="?attr/separatorStyle"
134134
android:layout_width="match_parent"
135-
android:layout_height="0.5dp"
136135
android:layout_above="@+id/resetButton"
137136
android:layout_marginTop="10dp"
138-
android:layout_marginBottom="10dp"
139-
android:background="@color/iron" />
137+
android:layout_marginBottom="10dp" />
140138

141139
<org.mozilla.vrbrowser.ui.views.settings.ButtonSetting
142140
android:id="@+id/resetButton"

app/src/main/res/layout/options_environment.xml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,13 @@
2727

2828
<View
2929
android:id="@+id/separatorTop"
30+
style="?attr/separatorStyle"
3031
android:layout_width="match_parent"
31-
android:layout_height="0.5dp"
3232
android:layout_below="@+id/backButton"
33-
android:layout_marginBottom="0dp"
34-
android:background="@color/iron" />
33+
android:layout_marginBottom="0dp" />
3534

3635
<ScrollView
3736
android:id="@+id/scrollbar"
38-
style="@style/scrollbar"
3937
android:layout_width="match_parent"
4038
android:layout_height="match_parent"
4139
android:paddingRight="15dp"
@@ -68,12 +66,11 @@
6866

6967
<View
7068
android:id="@+id/separatorBottom"
69+
style="?attr/separatorStyle"
7170
android:layout_width="match_parent"
72-
android:layout_height="0.5dp"
7371
android:layout_above="@+id/resetButton"
7472
android:layout_marginTop="10dp"
75-
android:layout_marginBottom="10dp"
76-
android:background="@color/iron" />
73+
android:layout_marginBottom="10dp" />
7774

7875
<org.mozilla.vrbrowser.ui.views.settings.ButtonSetting
7976
android:id="@+id/resetButton"

app/src/main/res/layout/options_language.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@
2727

2828
<View
2929
android:id="@+id/separatorTop"
30+
style="?attr/separatorStyle"
3031
android:layout_width="match_parent"
31-
android:layout_height="0.5dp"
3232
android:layout_below="@+id/voice_search_language_title"
3333
android:layout_marginTop="10dp"
34-
android:layout_marginBottom="10dp"
35-
android:background="@color/iron" />
34+
android:layout_marginBottom="10dp" />
3635

3736
<TextView
3837
android:id="@+id/voice_search_language_title"
@@ -69,12 +68,11 @@
6968

7069
<View
7170
android:id="@+id/separatorBottom"
71+
style="?attr/separatorStyle"
7272
android:layout_width="match_parent"
73-
android:layout_height="0.5dp"
7473
android:layout_above="@+id/resetButton"
7574
android:layout_marginTop="10dp"
76-
android:layout_marginBottom="10dp"
77-
android:background="@color/iron" />
75+
android:layout_marginBottom="10dp" />
7876

7977
<org.mozilla.vrbrowser.ui.views.settings.ButtonSetting
8078
android:id="@+id/resetButton"

app/src/main/res/layout/options_privacy.xml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,10 @@
2626

2727
<View
2828
android:id="@+id/separatorTop"
29+
style="?attr/separatorStyle"
2930
android:layout_width="match_parent"
30-
android:layout_height="0.5dp"
3131
android:layout_below="@+id/backButton"
32-
android:layout_marginBottom="10dp"
33-
android:background="@color/iron" />
32+
android:layout_marginBottom="10dp" />
3433

3534
<ScrollView
3635
android:id="@+id/scrollbar"
@@ -108,12 +107,11 @@
108107

109108
<View
110109
android:id="@+id/separatorBottom"
110+
style="?attr/separatorStyle"
111111
android:layout_width="match_parent"
112-
android:layout_height="0.5dp"
113112
android:layout_above="@+id/resetButton"
114113
android:layout_marginTop="10dp"
115-
android:layout_marginBottom="10dp"
116-
android:background="@color/iron" />
114+
android:layout_marginBottom="10dp" />
117115

118116
<org.mozilla.vrbrowser.ui.views.settings.ButtonSetting
119117
android:id="@+id/resetButton"

app/src/main/res/layout/setting_radio_item.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
</LinearLayout>
3131
<View
3232
android:layout_width="match_parent"
33-
android:layout_height="0.5dp"
34-
android:background="@color/iron" />
33+
style="?attr/separatorStyle" />
3534
</LinearLayout>
3635
</merge>

app/src/main/res/values/colors.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
<color name="blackberry">#25003e</color>
3030
<color name="tangerine">#ff921e</color>
3131
<color name="iron">#5d5d5d</color>
32+
<color name="iron_blur">#805d5d5d</color>
3233
<color name="rhino">#8c898a</color>
3334
<color name="geranium">#d73e5a</color>
3435
<color name="text_shadow">#8F000000</color>

app/src/main/res/values/styles.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,11 @@
1111
<attr name="mediaControlsButtonStyle" format="reference" />
1212
<attr name="navigationBarTextButtonStyle" format="reference" />
1313
<attr name="navigationBarButtonTint" format="reference" />
14+
<attr name="separatorStyle" format="reference" />
1415
<attr name="urlProtocolColor" format="color" />
1516
<attr name="urlWebsiteColor" format="color" />
1617
<attr name="scrollbarStyle" format="color" />
18+
1719
</declare-styleable>
1820

1921

@@ -49,6 +51,11 @@
4951
<item name="android:padding">0dp</item>
5052
</style>
5153

54+
<style name="separatorTheme">
55+
<item name="android:background">@drawable/separator_background</item>
56+
<item name="android:layout_height">1.5dp</item>
57+
</style>
58+
5259
<style name="uiButtonTheme">
5360
<item name="android:padding">@dimen/tray_icon_padding_max</item>
5461
<item name="android:layout_gravity">center_vertical</item>
@@ -289,6 +296,7 @@
289296
<item name="fullScreenFirstButtonStyle">@style/fullScreenFirstButtonTheme</item>
290297
<item name="fullScreenLastButtonStyle">@style/fullScreenLastButtonTheme</item>
291298
<item name="mediaControlsButtonStyle">@style/mediaControlsButtonTheme</item>
299+
<item name="separatorStyle">@style/separatorTheme</item>
292300
<item name="uiButtonStyle">@style/uiButtonTheme</item>
293301
<item name="navigationBarTextButtonStyle">@style/navigationBarTextButtonTheme</item>
294302
<item name="urlProtocolColor">@color/fog_url_protocol</item>

0 commit comments

Comments
 (0)