Skip to content

Commit 8d2853c

Browse files
Yi-FrankPeratX
authored andcommitted
theme: update color style (#93)
* change the colors * no message
1 parent c4a54b5 commit 8d2853c

File tree

5 files changed

+112
-130
lines changed

5 files changed

+112
-130
lines changed

app/src/main/assets/about_html/index.html

Lines changed: 52 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,9 @@
77
body {
88
text-align: center;
99
}
10-
11-
a:link {
12-
color: #FF4081;
13-
text-decoration: none;
14-
}
15-
16-
a:visited {
17-
color: #FF4081;
18-
text-decoration: none;
19-
}
20-
21-
a:hover {
22-
color: #FF4081;
23-
text-decoration: none;
10+
a {
11+
text-decoration:none;
2412
}
25-
26-
a:active {
27-
color: #FF4081;
28-
text-decoration: none;
29-
}
30-
3113
</style>
3214
</head>
3315

@@ -37,54 +19,61 @@
3719
document.getElementById("build_time").innerHTML = "Build time: " + time;
3820
document.getElementById("git_commit").innerHTML = "Git commit: " + gitCommit;
3921
}
22+
function changeColor(color){
23+
var aList = document.getElementsByTagName("a");
24+
for(var i = 0; i < aList.length;i++){
25+
aList[i].style.color = color;
26+
}
27+
}
4028
</script>
4129

4230
<body>
43-
<br>
44-
<img width="100" height="100" src="itxtech.png"/><br>
45-
<div style="font-size:25px"><a href="https://itxtech.org">iTX Technologies</a></div>
46-
<br>
47-
<img width="100" height="100" src="icon.png"><br>
48-
<div style="font-size: 25px;"><a href="https://github.com/iTXTech/Daedalus">Daedalus</a></div>
49-
<div id="version" style="font-size: 10px; color: gray;">Version: Unknown</div>
50-
<div id="build_time" style="font-size: 10px; color: gray;">Build time: Unknown</div>
51-
<div id="git_commit" style="font-size: 10px; color: gray;">Git commit: Unknown</div>
52-
<br>
53-
<div style="font-size: 12px; color: gray;">Users must comply with local laws and regulations.</div>
54-
<br>
55-
<div style="font-size: 12px; color: gray;">Copyright (C) 2017-2018 iTX Technologies <a href="mailto:[email protected]">[email protected]</a>
56-
</div>
57-
<br>
58-
<div style="font-size: 10px; color: gray;">
59-
This program is free software: you can redistribute it and/or modify<br>
60-
it under the terms of the GNU General Public License as published by<br>
61-
the Free Software Foundation, either version 3 of the License, or<br>
62-
(at your option) any later version.<br>
31+
<div style="padding:40px 0;">
32+
<img width="100" height="100" src="itxtech.png"/><br>
33+
<div style="font-size:25px"><a href="https://itxtech.org">iTX Technologies</a></div>
6334
<br>
64-
This program is distributed in the hope that it will be useful,<br>
65-
but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
66-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
67-
GNU General Public License for more details.<br>
35+
<img width="100" height="100" src="icon.png"><br>
36+
<div style="font-size: 25px;"><a href="https://github.com/iTXTech/Daedalus">Daedalus</a></div>
37+
<div id="version" style="font-size: 10px; color: gray;">Version: Unknown</div>
38+
<div id="build_time" style="font-size: 10px; color: gray;">Build time: Unknown</div>
39+
<div id="git_commit" style="font-size: 10px; color: gray;">Git commit: Unknown</div>
6840
<br>
69-
You should have received a copy of the GNU General Public License<br>
70-
along with this program. If not, see <a href="http://www.gnu.org/licenses/gpl-3.0.en.html">http://www.gnu.org/licenses/</a>.<br>
71-
</div>
72-
<br>
73-
<br>
74-
<div style="font-size: 16px; color: gray;">Open Source Licenses</div>
75-
<br>
76-
<div style="font-size: 14px; color: gray;">
77-
<a href="https://github.com/MrFuFuFu/ClearEditText">ClearEditText</a>: <a
78-
href="https://github.com/MrFuFuFu/ClearEditText">APL 2.0</a><br>
79-
<a href="https://github.com/julian-klode/dns66">DNS66</a>: <a
80-
href="https://github.com/julian-klode/dns66/blob/master/COPYING">GPLv3</a><br>
81-
<a href="https://github.com/kaitoy/pcap4j">Pcap4J</a>: <a href="https://github.com/kaitoy/pcap4j">MIT</a><br>
82-
<a href="https://github.com/rtreffer/minidns">MiniDNS</a>: <a
83-
href="https://github.com/rtreffer/minidns/blob/master/LICENCE_LGPL2.1">LGPLv2.1</a><br>
84-
<a href="https://github.com/google/gson">Gson</a>: <a
85-
href="https://github.com/google/gson/blob/master/LICENSE">APL 2.0</a><br>
86-
<a href="https://github.com/shadowsocks/shadowsocks-android">Shadowsocks</a>: <a
87-
href="https://github.com/shadowsocks/shadowsocks-android/blob/master/LICENSE">GPLv3</a>
41+
<div style="font-size: 12px; color: gray;">Users must comply with local laws and regulations.</div>
42+
<br>
43+
<div style="font-size: 12px; color: gray;">Copyright (C) 2017-2018 iTX Technologies <a href="mailto:[email protected]">[email protected]</a>
44+
</div>
45+
<br>
46+
<div style="font-size: 10px; color: gray;">
47+
This program is free software: you can redistribute it and/or modify<br>
48+
it under the terms of the GNU General Public License as published by<br>
49+
the Free Software Foundation, either version 3 of the License, or<br>
50+
(at your option) any later version.<br>
51+
<br>
52+
This program is distributed in the hope that it will be useful,<br>
53+
but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
54+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
55+
GNU General Public License for more details.<br>
56+
<br>
57+
You should have received a copy of the GNU General Public License<br>
58+
along with this program. If not, see <a href="http://www.gnu.org/licenses/gpl-3.0.en.html">http://www.gnu.org/licenses/</a>.<br>
59+
</div>
60+
<br>
61+
<br>
62+
<div style="font-size: 16px; color: gray;">Open Source Licenses</div>
63+
<br>
64+
<div style="font-size: 14px; color: gray;">
65+
<a href="https://github.com/MrFuFuFu/ClearEditText">ClearEditText</a>: <a
66+
href="https://github.com/MrFuFuFu/ClearEditText">APL 2.0</a><br>
67+
<a href="https://github.com/julian-klode/dns66">DNS66</a>: <a
68+
href="https://github.com/julian-klode/dns66/blob/master/COPYING">GPLv3</a><br>
69+
<a href="https://github.com/kaitoy/pcap4j">Pcap4J</a>: <a href="https://github.com/kaitoy/pcap4j">MIT</a><br>
70+
<a href="https://github.com/rtreffer/minidns">MiniDNS</a>: <a
71+
href="https://github.com/rtreffer/minidns/blob/master/LICENCE_LGPL2.1">LGPLv2.1</a><br>
72+
<a href="https://github.com/google/gson">Gson</a>: <a
73+
href="https://github.com/google/gson/blob/master/LICENSE">APL 2.0</a><br>
74+
<a href="https://github.com/shadowsocks/shadowsocks-android">Shadowsocks</a>: <a
75+
href="https://github.com/shadowsocks/shadowsocks-android/blob/master/LICENSE">GPLv3</a>
76+
</div>
8877
</div>
8978
</body>
9079
</html>

app/src/main/assets/about_html/index_zh.html

Lines changed: 53 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,9 @@
77
body {
88
text-align: center;
99
}
10-
11-
a:link {
12-
color: #FF4081;
13-
text-decoration: none;
14-
}
15-
16-
a:visited {
17-
color: #FF4081;
18-
text-decoration: none;
19-
}
20-
21-
a:hover {
22-
color: #FF4081;
23-
text-decoration: none;
10+
a {
11+
text-decoration:none;
2412
}
25-
26-
a:active {
27-
color: #FF4081;
28-
text-decoration: none;
29-
}
30-
3113
</style>
3214
</head>
3315

@@ -37,54 +19,62 @@
3719
document.getElementById("build_time").innerHTML = "构建时间:" + time;
3820
document.getElementById("git_commit").innerHTML = "Git commit:" + gitCommit;
3921
}
22+
function changeColor(color){
23+
var aList = document.getElementsByTagName("a");
24+
for(var i = 0; i < aList.length;i++){
25+
aList[i].style.color = color;
26+
}
27+
}
4028
</script>
4129

4230
<body>
43-
<br>
44-
<img width="100" height="100" src="itxtech.png"/><br>
45-
<div style="font-size:25px"><a href="https://itxtech.org">iTX Technologies</a></div>
46-
<br>
47-
<img width="100" height="100" src="icon.png"><br>
48-
<div style="font-size: 25px;"><a href="https://github.com/iTXTech/Daedalus">Daedalus</a></div>
49-
<div id="version" style="font-size: 10px; color: gray;">Version: Unknown</div>
50-
<div id="build_time" style="font-size: 10px; color: gray;">Build time: Unknown</div>
51-
<div id="git_commit" style="font-size: 10px; color: gray;">Git commit: Unknown</div>
52-
<br>
53-
<div style="font-size: 12px; color: gray;">使用者必须遵守当地法律法规。</div>
54-
<br>
55-
<div style="font-size: 12px; color: gray;">Copyright (C) 2017-2018 iTX Technologies <a href="mailto:[email protected]">[email protected]</a>
56-
</div>
57-
<br>
58-
<div style="font-size: 10px; color: gray;">
59-
This program is free software: you can redistribute it and/or modify<br>
60-
it under the terms of the GNU General Public License as published by<br>
61-
the Free Software Foundation, either version 3 of the License, or<br>
62-
(at your option) any later version.<br>
31+
32+
<div style="padding: 40px 0;">
33+
<img width="100" height="100" src="itxtech.png"/><br>
34+
<div style="font-size:25px"><a href="https://itxtech.org">iTX Technologies</a></div>
6335
<br>
64-
This program is distributed in the hope that it will be useful,<br>
65-
but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
66-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
67-
GNU General Public License for more details.<br>
36+
<img width="100" height="100" src="icon.png"><br>
37+
<div style="font-size: 25px;"><a href="https://github.com/iTXTech/Daedalus">Daedalus</a></div>
38+
<div id="version" style="font-size: 10px; color: gray;">Version: Unknown</div>
39+
<div id="build_time" style="font-size: 10px; color: gray;">Build time: Unknown</div>
40+
<div id="git_commit" style="font-size: 10px; color: gray;">Git commit: Unknown</div>
6841
<br>
69-
You should have received a copy of the GNU General Public License<br>
70-
along with this program. If not, see <a href="http://www.gnu.org/licenses/gpl-3.0.en.html">http://www.gnu.org/licenses/</a>.<br>
71-
</div>
72-
<br>
73-
<br>
74-
<div style="font-size: 16px; color: gray;">Open Source Licenses</div>
75-
<br>
76-
<div style="font-size: 14px; color: gray;">
77-
<a href="https://github.com/MrFuFuFu/ClearEditText">ClearEditText</a>: <a
78-
href="https://github.com/MrFuFuFu/ClearEditText">APL 2.0</a><br>
79-
<a href="https://github.com/julian-klode/dns66">DNS66</a>: <a
80-
href="https://github.com/julian-klode/dns66/blob/master/COPYING">GPLv3</a><br>
81-
<a href="https://github.com/kaitoy/pcap4j">Pcap4J</a>: <a href="https://github.com/kaitoy/pcap4j">MIT</a><br>
82-
<a href="https://github.com/rtreffer/minidns">MiniDNS</a>: <a
83-
href="https://github.com/rtreffer/minidns/blob/master/LICENCE_LGPL2.1">LGPLv2.1</a><br>
84-
<a href="https://github.com/google/gson">Gson</a>: <a
85-
href="https://github.com/google/gson/blob/master/LICENSE">APL 2.0</a><br>
86-
<a href="https://github.com/shadowsocks/shadowsocks-android">Shadowsocks</a>: <a
87-
href="https://github.com/shadowsocks/shadowsocks-android/blob/master/LICENSE">GPLv3</a>
42+
<div style="font-size: 12px; color: gray;">使用者必须遵守当地法律法规。</div>
43+
<br>
44+
<div style="font-size: 12px; color: gray;">Copyright (C) 2017-2018 iTX Technologies <a href="mailto:[email protected]">[email protected]</a>
45+
</div>
46+
<br>
47+
<div style="font-size: 10px; color: gray;">
48+
This program is free software: you can redistribute it and/or modify<br>
49+
it under the terms of the GNU General Public License as published by<br>
50+
the Free Software Foundation, either version 3 of the License, or<br>
51+
(at your option) any later version.<br>
52+
<br>
53+
This program is distributed in the hope that it will be useful,<br>
54+
but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
55+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
56+
GNU General Public License for more details.<br>
57+
<br>
58+
You should have received a copy of the GNU General Public License<br>
59+
along with this program. If not, see <a href="http://www.gnu.org/licenses/gpl-3.0.en.html">http://www.gnu.org/licenses/</a>.<br>
60+
</div>
61+
<br>
62+
<br>
63+
<div style="font-size: 16px; color: gray;">Open Source Licenses</div>
64+
<br>
65+
<div style="font-size: 14px; color: gray;">
66+
<a href="https://github.com/MrFuFuFu/ClearEditText">ClearEditText</a>: <a
67+
href="https://github.com/MrFuFuFu/ClearEditText">APL 2.0</a><br>
68+
<a href="https://github.com/julian-klode/dns66">DNS66</a>: <a
69+
href="https://github.com/julian-klode/dns66/blob/master/COPYING">GPLv3</a><br>
70+
<a href="https://github.com/kaitoy/pcap4j">Pcap4J</a>: <a href="https://github.com/kaitoy/pcap4j">MIT</a><br>
71+
<a href="https://github.com/rtreffer/minidns">MiniDNS</a>: <a
72+
href="https://github.com/rtreffer/minidns/blob/master/LICENCE_LGPL2.1">LGPLv2.1</a><br>
73+
<a href="https://github.com/google/gson">Gson</a>: <a
74+
href="https://github.com/google/gson/blob/master/LICENSE">APL 2.0</a><br>
75+
<a href="https://github.com/shadowsocks/shadowsocks-android">Shadowsocks</a>: <a
76+
href="https://github.com/shadowsocks/shadowsocks-android/blob/master/LICENSE">GPLv3</a>
77+
</div>
8878
</div>
8979
</body>
9080
</html>

app/src/main/java/org/itxtech/daedalus/fragment/AboutFragment.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public boolean shouldOverrideUrlLoading(WebView view, String url) {//for better
6161
public void onPageFinished(WebView view, String url) {
6262
super.onPageFinished(view, url);
6363
try {
64+
mWebView.loadUrl("javascript:changeColor('"+(Daedalus.isDarkTheme() ? "#FFFFFF" : "#000000")+"')");
6465
mWebView.loadUrl("javascript:changeVersionInfo('" + Daedalus.getInstance().getPackageManager().getPackageInfo(Daedalus.getInstance().getPackageName(), 0).versionName + "', '" + BuildConfig.BUILD_TIME + "', '" + BuildConfig.GIT_COMMIT + "')");
6566
} catch (Exception e) {
6667
Log.e("DAboutActivity", e.toString());

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
33
<color name="colorPrimary">#3F51B5</color>
4-
<color name="colorPrimaryDark">#303F9F</color>
5-
<color name="colorAccent">#FF4081</color>
4+
<color name="colorPrimaryDark">#2f42b5</color>
5+
<color name="colorPrimaryLight">#3F81f1</color>
6+
<color name="colorAccent">#3F51B5</color>
7+
<color name="colorAccentMark">#f2f2f2</color>
68
</resources>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
<item name="colorAccent">@color/colorAccent</item>
99
</style>
1010
<style name="AppTheme.Dark" parent="Theme.AppCompat.NoActionBar">
11-
<item name="colorPrimary">@color/colorPrimary</item>
11+
<item name="colorPrimary">@color/colorPrimaryLight</item>
1212
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
13-
<item name="colorAccent">@color/colorAccent</item>
13+
<item name="colorAccent">@color/colorPrimaryLight</item>
1414
</style>
1515
<style name="AppTheme.NoActionBar">
1616
<item name="windowActionBar">false</item>

0 commit comments

Comments
 (0)