Skip to content

Commit 1bd1e60

Browse files
committed
qt: Make Overview tab accessible via keyboard
1 parent 191187c commit 1bd1e60

File tree

2 files changed

+35
-56
lines changed

2 files changed

+35
-56
lines changed

src/qt/forms/overviewpage.ui

Lines changed: 34 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@
7272
<height>16777215</height>
7373
</size>
7474
</property>
75+
<property name="focusPolicy">
76+
<enum>Qt::ClickFocus</enum>
77+
</property>
7578
<property name="toolTip">
7679
<string>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</string>
7780
</property>
@@ -115,16 +118,13 @@
115118
<number>12</number>
116119
</property>
117120
<item row="2" column="2">
118-
<widget class="QLabel" name="labelWatchPending">
121+
<widget class="HighlightLabelWidget" name="labelWatchPending">
119122
<property name="font">
120123
<font>
121124
<weight>75</weight>
122125
<bold>true</bold>
123126
</font>
124127
</property>
125-
<property name="cursor">
126-
<cursorShape>IBeamCursor</cursorShape>
127-
</property>
128128
<property name="toolTip">
129129
<string>Unconfirmed transactions to watch-only addresses</string>
130130
</property>
@@ -134,22 +134,16 @@
134134
<property name="alignment">
135135
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
136136
</property>
137-
<property name="textInteractionFlags">
138-
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
139-
</property>
140137
</widget>
141138
</item>
142139
<item row="2" column="1">
143-
<widget class="QLabel" name="labelUnconfirmed">
140+
<widget class="HighlightLabelWidget" name="labelUnconfirmed">
144141
<property name="font">
145142
<font>
146143
<weight>75</weight>
147144
<bold>true</bold>
148145
</font>
149146
</property>
150-
<property name="cursor">
151-
<cursorShape>IBeamCursor</cursorShape>
152-
</property>
153147
<property name="toolTip">
154148
<string>Total of transactions that have yet to be confirmed, and do not yet count toward the spendable balance</string>
155149
</property>
@@ -159,22 +153,16 @@
159153
<property name="alignment">
160154
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
161155
</property>
162-
<property name="textInteractionFlags">
163-
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
164-
</property>
165156
</widget>
166157
</item>
167158
<item row="3" column="2">
168-
<widget class="QLabel" name="labelWatchImmature">
159+
<widget class="HighlightLabelWidget" name="labelWatchImmature">
169160
<property name="font">
170161
<font>
171162
<weight>75</weight>
172163
<bold>true</bold>
173164
</font>
174165
</property>
175-
<property name="cursor">
176-
<cursorShape>IBeamCursor</cursorShape>
177-
</property>
178166
<property name="toolTip">
179167
<string>Mined balance in watch-only addresses that has not yet matured</string>
180168
</property>
@@ -184,9 +172,6 @@
184172
<property name="alignment">
185173
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
186174
</property>
187-
<property name="textInteractionFlags">
188-
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
189-
</property>
190175
</widget>
191176
</item>
192177
<item row="4" column="0" colspan="2">
@@ -223,16 +208,13 @@
223208
</widget>
224209
</item>
225210
<item row="3" column="1">
226-
<widget class="QLabel" name="labelImmature">
211+
<widget class="HighlightLabelWidget" name="labelImmature">
227212
<property name="font">
228213
<font>
229214
<weight>75</weight>
230215
<bold>true</bold>
231216
</font>
232217
</property>
233-
<property name="cursor">
234-
<cursorShape>IBeamCursor</cursorShape>
235-
</property>
236218
<property name="toolTip">
237219
<string>Mined balance that has not yet matured</string>
238220
</property>
@@ -242,9 +224,6 @@
242224
<property name="alignment">
243225
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
244226
</property>
245-
<property name="textInteractionFlags">
246-
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
247-
</property>
248227
</widget>
249228
</item>
250229
<item row="2" column="3">
@@ -268,16 +247,13 @@
268247
</widget>
269248
</item>
270249
<item row="5" column="1">
271-
<widget class="QLabel" name="labelTotal">
250+
<widget class="HighlightLabelWidget" name="labelTotal">
272251
<property name="font">
273252
<font>
274253
<weight>75</weight>
275254
<bold>true</bold>
276255
</font>
277256
</property>
278-
<property name="cursor">
279-
<cursorShape>IBeamCursor</cursorShape>
280-
</property>
281257
<property name="toolTip">
282258
<string>Your current total balance</string>
283259
</property>
@@ -287,22 +263,16 @@
287263
<property name="alignment">
288264
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
289265
</property>
290-
<property name="textInteractionFlags">
291-
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
292-
</property>
293266
</widget>
294267
</item>
295268
<item row="5" column="2">
296-
<widget class="QLabel" name="labelWatchTotal">
269+
<widget class="HighlightLabelWidget" name="labelWatchTotal">
297270
<property name="font">
298271
<font>
299272
<weight>75</weight>
300273
<bold>true</bold>
301274
</font>
302275
</property>
303-
<property name="cursor">
304-
<cursorShape>IBeamCursor</cursorShape>
305-
</property>
306276
<property name="toolTip">
307277
<string>Current total balance in watch-only addresses</string>
308278
</property>
@@ -312,9 +282,6 @@
312282
<property name="alignment">
313283
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
314284
</property>
315-
<property name="textInteractionFlags">
316-
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
317-
</property>
318285
</widget>
319286
</item>
320287
<item row="0" column="2">
@@ -335,16 +302,13 @@
335302
</widget>
336303
</item>
337304
<item row="1" column="1">
338-
<widget class="QLabel" name="labelBalance">
305+
<widget class="HighlightLabelWidget" name="labelBalance">
339306
<property name="font">
340307
<font>
341308
<weight>75</weight>
342309
<bold>true</bold>
343310
</font>
344311
</property>
345-
<property name="cursor">
346-
<cursorShape>IBeamCursor</cursorShape>
347-
</property>
348312
<property name="toolTip">
349313
<string>Your current spendable balance</string>
350314
</property>
@@ -354,22 +318,16 @@
354318
<property name="alignment">
355319
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
356320
</property>
357-
<property name="textInteractionFlags">
358-
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
359-
</property>
360321
</widget>
361322
</item>
362323
<item row="1" column="2">
363-
<widget class="QLabel" name="labelWatchAvailable">
324+
<widget class="HighlightLabelWidget" name="labelWatchAvailable">
364325
<property name="font">
365326
<font>
366327
<weight>75</weight>
367328
<bold>true</bold>
368329
</font>
369330
</property>
370-
<property name="cursor">
371-
<cursorShape>IBeamCursor</cursorShape>
372-
</property>
373331
<property name="toolTip">
374332
<string>Your current balance in watch-only addresses</string>
375333
</property>
@@ -379,9 +337,6 @@
379337
<property name="alignment">
380338
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
381339
</property>
382-
<property name="textInteractionFlags">
383-
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
384-
</property>
385340
</widget>
386341
</item>
387342
<item row="2" column="0">
@@ -458,6 +413,9 @@
458413
<height>16777215</height>
459414
</size>
460415
</property>
416+
<property name="focusPolicy">
417+
<enum>Qt::ClickFocus</enum>
418+
</property>
461419
<property name="toolTip">
462420
<string>The displayed information may be out of date. Your wallet automatically synchronizes with the Bitcoin network after a connection is established, but this process has not completed yet.</string>
463421
</property>
@@ -497,6 +455,9 @@
497455
</item>
498456
<item>
499457
<widget class="QListView" name="listTransactions">
458+
<property name="focusPolicy">
459+
<enum>Qt::ClickFocus</enum>
460+
</property>
500461
<property name="styleSheet">
501462
<string notr="true">QListView { background: transparent; }</string>
502463
</property>
@@ -536,6 +497,23 @@
536497
</item>
537498
</layout>
538499
</widget>
500+
<customwidgets>
501+
<customwidget>
502+
<class>HighlightLabelWidget</class>
503+
<extends>QLabel</extends>
504+
<header>qt/highlightlabelwidget.h</header>
505+
</customwidget>
506+
</customwidgets>
507+
<tabstops>
508+
<tabstop>labelBalance</tabstop>
509+
<tabstop>labelUnconfirmed</tabstop>
510+
<tabstop>labelImmature</tabstop>
511+
<tabstop>labelTotal</tabstop>
512+
<tabstop>labelWatchAvailable</tabstop>
513+
<tabstop>labelWatchPending</tabstop>
514+
<tabstop>labelWatchImmature</tabstop>
515+
<tabstop>labelWatchTotal</tabstop>
516+
</tabstops>
539517
<resources/>
540518
<connections/>
541519
</ui>

src/qt/overviewpage.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <qt/clientmodel.h>
1010
#include <qt/guiconstants.h>
1111
#include <qt/guiutil.h>
12+
#include <qt/highlightlabelwidget.h>
1213
#include <qt/optionsmodel.h>
1314
#include <qt/platformstyle.h>
1415
#include <qt/transactionfilterproxy.h>

0 commit comments

Comments
 (0)