Skip to content

Commit 12106ce

Browse files
committed
Update main button UI
WE2-991 Signed-off-by: Raul Metsma <[email protected]>
1 parent e25e20c commit 12106ce

File tree

11 files changed

+44
-139
lines changed

11 files changed

+44
-139
lines changed

src/app/main.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@
2828

2929
int main(int argc, char* argv[])
3030
{
31-
Q_INIT_RESOURCE(web_eid_resources);
32-
3331
Application app(argc, argv, QStringLiteral("web-eid"));
3432

3533
try {

src/mac/main.mm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,6 @@ void showSafariSettings() final
169169

170170
int main(int argc, char* argv[])
171171
{
172-
Q_INIT_RESOURCE(web_eid_resources);
173-
174172
SafariApplication app(argc, argv, QStringLiteral("web-eid-safari"));
175173
auto appPtr = &app;
176174

src/ui/CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,17 @@ add_library(ui STATIC
88
ui.cpp
99
webeiddialog.cpp
1010
webeiddialog.hpp
11-
web-eid-resources.qrc
1211
dialog.ui
1312
)
14-
qt_add_resources(ui qss PREFIX / FILES dark.qss languageselect.qss)
13+
file(GLOB IMAGES images/*)
14+
file(GLOB FONTS fonts/*)
15+
qt_add_resources(ui resources BASE ${CMAKE_CURRENT_SOURCE_DIR} PREFIX / FILES
16+
../../install/appicon_128.png
17+
dark.qss
18+
languageselect.qss
19+
${IMAGES}
20+
${FONTS}
21+
)
1522
file(GLOB TRANSLATIONS translations/*.ts)
1623
qt_add_translations(ui TS_FILES ${TRANSLATIONS} RESOURCE_PREFIX /translations)
1724
set_target_properties(ui PROPERTIES

src/ui/dark.qss

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,11 @@ background-color: #232325;
33
color: white;
44
}
55
QPushButton {
6-
border-color: #4E4E53;
7-
background-color: #4E4E53;
8-
}
9-
QPushButton::disabled {
10-
border-color: #27272A;
11-
background-color: #27272A;
12-
}
13-
QPushButton::hover {
14-
background-color: #76767B;
15-
border-color: #76767B;
16-
}
17-
QPushButton::focus {
18-
background-color: #76767B;
19-
border-color: #DEDEDE;
20-
}
21-
QPushButton:default {
22-
background-color: #113F8E;
23-
border-color: #113F8E;
6+
color: #FF5C79;
7+
border-color: #FF5C79;
248
}
25-
QPushButton:default::disabled {
26-
background-color: #15213E;
27-
border-color: #15213E;
28-
}
29-
QPushButton:default::hover {
30-
background-color: #008EEA;
31-
border-color: #008EEA;
32-
}
33-
QPushButton:default::focus {
34-
background-color: #008EEA;
35-
border-color: #DEDEDE;
9+
QPushButton:hover, QPushButton:pressed {
10+
background-color: #232325;
3611
}
3712
#langButton {
3813
color: #FFFFFF;

src/ui/dialog.ui

Lines changed: 28 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -27,43 +27,32 @@ font-family: &quot;Roboto&quot;;
2727
color: black;
2828
}
2929
QPushButton {
30-
font-size: 17px;
31-
border: 3px solid #EFEFEF;
32-
border-radius: 3px;
33-
height: 39px;
34-
padding-left: 17px;
35-
padding-right: 17px;
36-
min-width: 30px;
37-
background-color: #EFEFEF;
38-
}
39-
QPushButton::disabled {
40-
background-color: #FAFAFA;
41-
border-color: #FAFAFA;
30+
color: #AD2A45;
31+
border: 1px solid #AD2A45;
32+
border-radius: 4px;
33+
padding: 11px 12px;
34+
font-family: Roboto, Helvetica;
35+
font-size: 14px;
36+
font-weight: 700;
4237
}
43-
QPushButton::hover {
44-
background-color: #DEDEDE;
45-
border-color: #DEDEDE;
38+
QPushButton:hover {
39+
background-color: #F5EBED;
4640
}
47-
QPushButton::focus {
48-
background-color: #DEDEDE;
49-
border-color: #76767B;
41+
QPushButton:pressed {
42+
background-color: #E1C1C6;
5043
}
51-
QPushButton:default {
44+
QPushButton::default, #helpButton {
5245
color: white;
53-
background-color: #113F8E;
54-
border-color: #113F8E;
46+
border-color: #2F70B6;
47+
background-color: #2F70B6;
5548
}
56-
QPushButton:default::disabled {
57-
background-color: #B7C5DD;
58-
border-color: #B7C5DD;
49+
QPushButton::default:hover, #helpButton:hover {
50+
border-color: #2B66A6;
51+
background-color: #2B66A6;
5952
}
60-
QPushButton:default::hover {
61-
background-color: #003168;
62-
border-color: #003168
63-
}
64-
QPushButton:default::focus {
65-
background-color: #003168;
66-
border-color: #008EEA;
53+
QPushButton::default:pressed, #helpButton:pressed {
54+
border-color: #215081;
55+
background-color: #215081;
6756
}
6857
#langButton {
6958
color: #003168;
@@ -166,9 +155,6 @@ border-radius: 3px;
166155
#fatalErrorLabel, #aboutAlert {
167156
color: #CD2541;
168157
}
169-
#helpButton {
170-
color: #003168;
171-
}
172158
#aboutVersion {
173159
color: #76767B;
174160
}
@@ -874,21 +860,24 @@ height: 24px;
874860
<property name="cursor">
875861
<cursorShape>PointingHandCursor</cursorShape>
876862
</property>
863+
<property name="layoutDirection">
864+
<enum>Qt::RightToLeft</enum>
865+
</property>
877866
<property name="text">
878867
<string>Help</string>
879868
</property>
880869
<property name="icon">
881870
<iconset resource="web-eid-resources.qrc">
882-
<normaloff>:/images/help.svg</normaloff>:/images/help.svg</iconset>
871+
<normaloff>:/images/link.svg</normaloff>:/images/link.svg</iconset>
883872
</property>
884873
<property name="iconSize">
885874
<size>
886-
<width>30</width>
887-
<height>26</height>
875+
<width>16</width>
876+
<height>16</height>
888877
</size>
889878
</property>
890-
<property name="autoDefault">
891-
<bool>false</bool>
879+
<property name="default">
880+
<bool>true</bool>
892881
</property>
893882
</widget>
894883
</item>
@@ -900,16 +889,6 @@ height: 24px;
900889
<property name="text">
901890
<string>Confirm</string>
902891
</property>
903-
<property name="icon">
904-
<iconset resource="web-eid-resources.qrc">
905-
<normaloff>:/images/arrow.svg</normaloff>:/images/arrow.svg</iconset>
906-
</property>
907-
<property name="iconSize">
908-
<size>
909-
<width>20</width>
910-
<height>16</height>
911-
</size>
912-
</property>
913892
<property name="default">
914893
<bool>true</bool>
915894
</property>

src/ui/images/arrow.svg

Lines changed: 0 additions & 4 deletions
This file was deleted.

src/ui/images/help.svg

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/ui/images/help_dark.svg

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/ui/images/link.svg

Lines changed: 3 additions & 0 deletions
Loading

src/ui/web-eid-resources.qrc

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)