Skip to content

Commit 807bd2d

Browse files
authored
fix(tab-android): blurry font icons (#82)
1 parent b447020 commit 807bd2d

File tree

4 files changed

+51
-41
lines changed

4 files changed

+51
-41
lines changed

packages/template-tab-navigation-ng/src/_app-common.scss

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,13 @@
22
// This is where the vast majority of your CSS code goes.
33
// Font icon class
44
.fa {
5-
font-family: "FontAwesome";
5+
font-family: "FontAwesome";
66
}
7+
8+
.t-36 {
9+
font-size: 36;
10+
}
11+
712
// Common page class
813
.page-content {
914
.page-placeholder {
@@ -25,4 +30,4 @@
2530
//Action bar
2631
ActionBar .action-bar-title {
2732
horizontal-align: center;
28-
}
33+
}

packages/template-tab-navigation-ng/src/app/app.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717
will "adopt"; any other layout elements you try to specify will be ignored
1818
-->
1919
<Label text="Home"></Label>
20-
<Image src="font://&#xf015;" class="fa"></Image>
20+
<Image src="font://&#xf015;" class="fa t-36"></Image>
2121
</TabStripItem>
2222
<TabStripItem>
2323
<Label text="Browse"></Label>
24-
<Image src="font://&#xf1ea;" class="fa"></Image>
24+
<Image src="font://&#xf1ea;" class="fa t-36"></Image>
2525
</TabStripItem>
2626
<TabStripItem>
2727
<Label text="Search"></Label>
28-
<Image src="font://&#xf002;" class="fa"></Image>
28+
<Image src="font://&#xf002;" class="fa t-36"></Image>
2929
</TabStripItem>
3030
</TabStrip>
3131

packages/template-tab-navigation/app/_app-common.scss

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,46 @@
44
.fa {
55
font-family: "FontAwesome";
66
}
7-
// Common page class
8-
.page-content {
9-
.page-placeholder {
10-
color: $page-icon-color;
11-
font-size: $page-content-placeholder-font-size;
12-
vertical-align: center;
13-
horizontal-align: center;
14-
}
15-
16-
.page-icon {
17-
font-size: 72;
18-
vertical-align: top;
19-
horizontal-align: center;
20-
color: $page-icon-color;
21-
margin-top: 20%;
22-
}
23-
}
247

25-
//Action bar
26-
ActionBar .action-bar-title {
27-
horizontal-align: center;
28-
}
8+
.t-36 {
9+
font-size: 36;
10+
}
2911

30-
TabStripItem Label {
31-
color: $blue-dark;
32-
}
12+
// Common page class
13+
.page-content {
14+
.page-placeholder {
15+
color: $page-icon-color;
16+
font-size: $page-content-placeholder-font-size;
17+
vertical-align: center;
18+
horizontal-align: center;
19+
}
3320

34-
TabStripItem:active Label {
35-
color: $item-active-color;
36-
}
21+
.page-icon {
22+
font-size: 72;
23+
vertical-align: top;
24+
horizontal-align: center;
25+
color: $page-icon-color;
26+
margin-top: 20%;
27+
}
28+
}
3729

38-
TabStripItem Image {
39-
color: $blue-dark;
40-
}
30+
//Action bar
31+
ActionBar .action-bar-title {
32+
horizontal-align: center;
33+
}
4134

42-
TabStripItem:active Image {
43-
color: $item-active-color;
44-
}
35+
TabStripItem Label {
36+
color: $blue-dark;
37+
}
38+
39+
TabStripItem:active Label {
40+
color: $item-active-color;
41+
}
42+
43+
TabStripItem Image {
44+
color: $blue-dark;
45+
}
46+
47+
TabStripItem:active Image {
48+
color: $item-active-color;
49+
}

packages/template-tab-navigation/app/app-root.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ https://docs.nativescript.org/angular/ui/ng-ui-widgets/tabs.
2525
will "adopt"; any other layout elements you try to specify will be ignored
2626
-->
2727
<Label text="Home" />
28-
<Image src="font://&#xf015;" class="fa" />
28+
<Image src="font://&#xf015;" class="fa t-36" />
2929
</TabStripItem>
3030
<TabStripItem>
3131
<Label text="Browse" />
32-
<Image src="font://&#xf1ea;" class="fa" />
32+
<Image src="font://&#xf1ea;" class="fa t-36" />
3333
</TabStripItem>
3434
<TabStripItem>
3535
<Label text="Search" />
36-
<Image src="font://&#xf002;" class="fa" />
36+
<Image src="font://&#xf002;" class="fa t-36" />
3737
</TabStripItem>
3838
</TabStrip>
3939

0 commit comments

Comments
 (0)