mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-23 20:14:05 +00:00
Dictionaries dialog: always show Maximize button
This dialog can make use of extra horizontal space when there are many groups, extra vertical space - when there are many dictionaries. Thus maximizing Dictionaries dialog can be useful. Currently Dictionaries dialog features the following window buttons in the top right corner: * Close button under Xfce on GNU/Linux; * Context help, Minimize, Maximize and Close buttons under KDE Plasma on GNU/Linux; * Help, Close buttons on Windows (according to Internet screenshots). With this commit the top-right corner window buttons become: * Maximize and Close buttons under Xfce on GNU/Linux; * Minimize, Maximize and Close buttons under KDE Plasma on GNU/Linux; * disabled Minimize button; Maximize and Close buttons on Windows (thanks to @nonwill for checking this). I don't think that Minimize button is useful in this dialog. But it does no harm, so I won't go out of my way to remove it on all platforms. Interestingly, the Minimize button won't show up under Xfce even if Qt::WindowMinimizeButtonHint is on. It is difficult if at all possible to remove this button under KDE Plasma. Fortunately, the Minimize button works well in this desktop environment: minimizing hides both the dialog and the main window, unminimizing shows both windows. @nonwill found that this button doesn't work well on Windows: minimizing the dialog hides it, but keeps the main window visible with its input still blocked by the hidden dialog. Therefore it is just as well that the Minimize button is disabled on Windows. I couldn't find a UI element in the Dictionaries dialog that features context help. Therefore the Context help/Help (question mark) button must be useless. So removing it is an extra benefit of this commit. I cannot check which window buttons are visible with this commit on macOS, but I expect them to include Maximize, Close buttons and be acceptable overall. Closes #1359.
This commit is contained in:
parent
e1c9a0d6de
commit
c3e4a99ea4
|
@ -13,7 +13,9 @@ EditDictionaries::EditDictionaries( QWidget * parent, Config::Class & cfg_,
|
|||
vector< sptr< Dictionary::Class > > & dictionaries_,
|
||||
Instances::Groups & groupInstances_,
|
||||
QNetworkAccessManager & dictNetMgr_ ):
|
||||
QDialog( parent ), cfg( cfg_ ), dictionaries( dictionaries_ ),
|
||||
QDialog( parent, Qt::WindowSystemMenuHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint ),
|
||||
cfg( cfg_ ),
|
||||
dictionaries( dictionaries_ ),
|
||||
groupInstances( groupInstances_ ),
|
||||
dictNetMgr( dictNetMgr_ ),
|
||||
origCfg( cfg ),
|
||||
|
|
Loading…
Reference in a new issue