Skip to content

Commit bb9b67f

Browse files
committed
Adjust SignatureDialog layout
IB-7970 Signed-off-by: Raul Metsma <raul@metsma.ee>
1 parent c680e2c commit bb9b67f

File tree

3 files changed

+73
-116
lines changed

3 files changed

+73
-116
lines changed

client/dialogs/SignatureDialog.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -128,22 +128,22 @@ SignatureDialog::SignatureDialog(const DigiDocSignature &signature, QWidget *par
128128
lbl->setFocusPolicy(cnt->text().isEmpty() ? Qt::NoFocus : Qt::TabFocus);
129129
cnt->setFocusPolicy(cnt->text().isEmpty() ? Qt::NoFocus : Qt::TabFocus);
130130
};
131-
setFocus(d->lblSigningCity, d->signerCity);
132-
setFocus(d->lblSigningState, d->signerState);
133-
setFocus(d->lblSigningCountry, d->signerCountry);
134-
setFocus(d->lblSigningZip, d->signerZip);
135-
setFocus(d->lblRole, d->signerRoles);
131+
setFocus(d->labelCity, d->signerCity);
132+
setFocus(d->labelState, d->signerState);
133+
setFocus(d->labelCountry, d->signerCountry);
134+
setFocus(d->labelZip, d->signerZip);
135+
setFocus(d->labelRoles, d->signerRoles);
136136

137137
// Certificate info
138138
QTreeWidget *t = d->signatureView;
139139
t->header()->setSectionResizeMode(0, QHeaderView::Fixed);
140140
t->header()->resizeSection(0, 244);
141141

142-
auto addCert = [this](QTreeWidget *t, const QString &title, const QString &title2, const SslCertificate &cert) {
142+
auto addCert = [this](QTreeWidget *t, const QString &title, const QString &title2, const QSslCertificate &cert) {
143143
if(cert.isNull())
144144
return;
145145
addItem(t, title, cert);
146-
addItem(t, title2, cert.issuerInfo(QSslCertificate::CommonName));
146+
addItem(t, title2, cert.issuerInfo(QSslCertificate::CommonName).join(' '));
147147
};
148148
auto addTime = [this](QTreeWidget *t, const QString &title, const QDateTime &time) {
149149
if(time.isNull())

client/dialogs/SignatureDialog.ui

Lines changed: 66 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,25 @@
99
<rect>
1010
<x>0</x>
1111
<y>0</y>
12-
<width>1013</width>
13-
<height>600</height>
12+
<width>1090</width>
13+
<height>816</height>
1414
</rect>
1515
</property>
1616
<property name="styleSheet">
17-
<string notr="true">#SignatureDialog {
18-
background-color: #ffffff;
17+
<string notr="true">QWidget {
18+
font-family: Roboto, Helvetica;
19+
font-size: 14px;
20+
color: #07142A;
21+
}
22+
#SignatureDialog {
23+
background-color: #FFFFFF;
24+
border-radius: 4px;
1925
}
2026
#lblSignerHeader, #lblSignatureHeader {
21-
font-family: Roboto, Helvetica;
2227
font-size: 22px;
23-
color: #003168
28+
color: #003168;
2429
}
2530
#status, #warning, #lblNotice {
26-
font-family: Roboto, Helvetica;
2731
font-size: 12px;
2832
color: #091A36;
2933
padding: 2px 10px;
@@ -67,36 +71,21 @@ background-color: #EAF8EA;
6771
</property>
6872
<item row="0" column="0">
6973
<widget class="QWidget" name="leftPane" native="true">
70-
<property name="minimumSize">
71-
<size>
72-
<width>505</width>
73-
<height>0</height>
74-
</size>
75-
</property>
7674
<property name="styleSheet">
7775
<string notr="true">#leftPane {
7876
border-right: 1px solid #E7EAEF;
7977
}
80-
#info, #error {
81-
font-family: Roboto, Helvetica;
82-
font-size: 14px;
83-
color: #07142A;
84-
}
85-
#lblSigningCity, #lblSigningCounty, #lblSigningState, #lblSigningZip, #lblRole {
86-
font-family: Roboto, Helvetica;
87-
font-size: 14px;
88-
color: #07142A;
89-
}
9078
#signerCity, #signerCountry, #signerState, #signerZip, #signerRoles {
91-
font-family: Roboto, Helvetica;
9279
font-size: 16px;
9380
color: #607496;
9481
border: 1px solid #C4CBD8;
9582
border-radius: 4px;
9683
background-color: #F3F5F7;
9784
padding: 10px 14px;
9885
}
99-
</string>
86+
#showErrors, #showRole {
87+
border-right: none; /*Workaround for right padding*/
88+
}</string>
10089
</property>
10190
<layout class="QVBoxLayout" name="leftPaneLayout" stretch="0,0,0,0,1,0,0,0">
10291
<property name="spacing">
@@ -112,10 +101,16 @@ padding: 10px 14px;
112101
<number>24</number>
113102
</property>
114103
<property name="bottomMargin">
115-
<number>32</number>
104+
<number>24</number>
116105
</property>
117106
<item>
118107
<widget class="QLabel" name="lblSignerHeader">
108+
<property name="minimumSize">
109+
<size>
110+
<width>506</width>
111+
<height>0</height>
112+
</size>
113+
</property>
119114
<property name="focusPolicy">
120115
<enum>Qt::TabFocus</enum>
121116
</property>
@@ -161,6 +156,12 @@ padding: 10px 14px;
161156
</item>
162157
<item>
163158
<widget class="AccordionTitle" name="showErrors">
159+
<property name="minimumSize">
160+
<size>
161+
<width>0</width>
162+
<height>40</height>
163+
</size>
164+
</property>
164165
<property name="cursor">
165166
<cursorShape>PointingHandCursor</cursorShape>
166167
</property>
@@ -207,6 +208,12 @@ background: none;
207208
</item>
208209
<item>
209210
<widget class="AccordionTitle" name="showRole">
211+
<property name="minimumSize">
212+
<size>
213+
<width>0</width>
214+
<height>40</height>
215+
</size>
216+
</property>
210217
<property name="cursor">
211218
<cursorShape>PointingHandCursor</cursorShape>
212219
</property>
@@ -237,12 +244,12 @@ background: none;
237244
<number>0</number>
238245
</property>
239246
<item>
240-
<layout class="QVBoxLayout" name="layoutRole">
247+
<layout class="QVBoxLayout" name="signerRolesLayout">
241248
<property name="spacing">
242249
<number>6</number>
243250
</property>
244251
<item>
245-
<widget class="QLabel" name="lblRole">
252+
<widget class="QLabel" name="labelRoles">
246253
<property name="text">
247254
<string>Role / resolution</string>
248255
</property>
@@ -270,12 +277,12 @@ background: none;
270277
</layout>
271278
</item>
272279
<item>
273-
<layout class="QVBoxLayout" name="layoutCity">
280+
<layout class="QVBoxLayout" name="signerCityLayout">
274281
<property name="spacing">
275282
<number>6</number>
276283
</property>
277284
<item>
278-
<widget class="QLabel" name="lblSigningCity">
285+
<widget class="QLabel" name="labelCity">
279286
<property name="text">
280287
<string>City</string>
281288
</property>
@@ -294,12 +301,12 @@ background: none;
294301
</layout>
295302
</item>
296303
<item>
297-
<layout class="QVBoxLayout" name="layoutState">
304+
<layout class="QVBoxLayout" name="signerStateLayout">
298305
<property name="spacing">
299306
<number>6</number>
300307
</property>
301308
<item>
302-
<widget class="QLabel" name="lblSigningState">
309+
<widget class="QLabel" name="labelState">
303310
<property name="text">
304311
<string>State</string>
305312
</property>
@@ -318,12 +325,12 @@ background: none;
318325
</layout>
319326
</item>
320327
<item>
321-
<layout class="QVBoxLayout" name="layoutCountry">
328+
<layout class="QVBoxLayout" name="signerCountryLayout">
322329
<property name="spacing">
323330
<number>6</number>
324331
</property>
325332
<item>
326-
<widget class="QLabel" name="lblSigningCountry">
333+
<widget class="QLabel" name="labelCountry">
327334
<property name="text">
328335
<string>Country</string>
329336
</property>
@@ -342,12 +349,12 @@ background: none;
342349
</layout>
343350
</item>
344351
<item>
345-
<layout class="QVBoxLayout" name="layoutZip">
352+
<layout class="QVBoxLayout" name="signerZipLayout">
346353
<property name="spacing">
347354
<number>6</number>
348355
</property>
349356
<item>
350-
<widget class="QLabel" name="lblSigningZip">
357+
<widget class="QLabel" name="labelZip">
351358
<property name="text">
352359
<string>Zip</string>
353360
</property>
@@ -358,6 +365,9 @@ background: none;
358365
<property name="textFormat">
359366
<enum>Qt::PlainText</enum>
360367
</property>
368+
<property name="wordWrap">
369+
<bool>true</bool>
370+
</property>
361371
<property name="textInteractionFlags">
362372
<set>Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
363373
</property>
@@ -399,10 +409,16 @@ background: none;
399409
<number>24</number>
400410
</property>
401411
<property name="bottomMargin">
402-
<number>32</number>
412+
<number>24</number>
403413
</property>
404414
<item>
405415
<widget class="QLabel" name="lblSignatureHeader">
416+
<property name="minimumSize">
417+
<size>
418+
<width>488</width>
419+
<height>0</height>
420+
</size>
421+
</property>
406422
<property name="focusPolicy">
407423
<enum>Qt::TabFocus</enum>
408424
</property>
@@ -416,31 +432,21 @@ background: none;
416432
</item>
417433
<item>
418434
<widget class="QTreeWidget" name="signatureView">
419-
<property name="minimumSize">
420-
<size>
421-
<width>460</width>
422-
<height>450</height>
423-
</size>
424-
</property>
425435
<property name="styleSheet">
426436
<string notr="true">QLabel {
427-
font-family: Roboto, Helvetica;
428437
font-size: 12px;
429-
color: #07142A;
430438
}
431439
QPushButton {
432-
font-family: Roboto, Helvetica;
433440
font-size: 12px;
434441
text-align: left;
435442
text-decoration: underline;
436443
color: #2F70B6;
437444
border: none;
438445
}
439446
QHeaderView::section {
440-
font-family: Roboto, Helvetica;
441-
font-size: 14px;
442-
border: none;
443-
border-bottom: 1px solid #E7EAEF;
447+
border: 1px solid #E7EAEF;
448+
border-width: 0px 0px 1px 0px;
449+
padding: 0px 0px 8px 5px;
444450
background-color: #FFFFFF;
445451
}</string>
446452
</property>
@@ -457,7 +463,10 @@ background-color: #FFFFFF;
457463
<enum>QAbstractItemView::SelectRows</enum>
458464
</property>
459465
<property name="indentation">
460-
<number>0</number>
466+
<number>5</number>
467+
</property>
468+
<property name="rootIsDecorated">
469+
<bool>false</bool>
461470
</property>
462471
<property name="columnCount">
463472
<number>2</number>
@@ -496,27 +505,23 @@ border-top: 1px solid #E7EAEF;
496505
background-color: #F3F5F7;
497506
}
498507
#title {
499-
font-family: Roboto, Helvetica;
500-
color: #07142A;
501-
font-size: 14px;
502508
font-weight: 700;
503509
}
504-
#navigationArea {
505-
border-top: 1px solid #E7EAEF;
506-
background-color: #F3F5F7;
507-
}
508510
QPushButton {
509511
padding: 10px 12px;
512+
border: 1px solid #2F70B6;
510513
border-radius: 4px;
511514
color: #ffffff;
512515
background-color: #2F70B6;
513516
font-size: 12px;
514517
font-weight: 700;
515518
}
516519
QPushButton:hover, QPushButton:focus {
520+
border-color: #2B66A6;
517521
background-color: #2B66A6;
518522
}
519523
QPushButton:pressed {
524+
border-color: #215081;
520525
background-color: #215081;
521526
}</string>
522527
</property>
@@ -605,6 +610,9 @@ background-color: #215081;
605610
<property name="text">
606611
<string>Close</string>
607612
</property>
613+
<property name="default">
614+
<bool>true</bool>
615+
</property>
608616
</widget>
609617
</item>
610618
</layout>

0 commit comments

Comments
 (0)