[PATCH 00/11] HiDPI support, v1

Giuseppe Bilotta giuseppe.bilotta at gmail.com
Wed Oct 15 06:30:44 PDT 2014


Hello all,

this patchset aims at introducing HiDPI monitor support in Subsurface.
Most of the thing is automagically handled by Qt (thanks Qt!), so the
only thing that needed work were the fixed widths of icons and table
columns.

Since I'm not actually a Subsurface user myself, I've only tried messing
around here and there, looking for stuff that seemed out of place. If
you don't have a HiDPI screen yourself, you can actually 'cheat' by
using `xrandr --dpi <somevalue>` to see if things still align correctly
or not.

There are essentially three things that still need work:

1. the toolbar in the profile widget has a fixed size of 24x24 for
icons; apparently, this is an issue in Qt 4.8 itself, since this is the
default regardless of the DPI settings (haven't tested in Qt 5 yet, it
might be fixed there); we can override this with our own DPI-based
settings, but:

2. a lot of the icons for the toolbar are 24x24 PNGs, and Qt won't scale
them (nor it should); these should be converted to SVGs; in fact, all
icons should be converted to SVGs IMO;

3. finally, I haven't done extensive checks on the dialogs, but it's
pretty obvious that they _don't_ scale correctly, at least not with Qt
4.8; an important question here is whether we care about it (which IMO
we should, since apparently it's the Qt that's shipping with the
upcoming Debian Jessie), or not (in the hopes that Qt 5 does handle
things significantly better;

4. the conversion to DPI-independent doesn't fix unrelated issues such
as the funky + button placement on Equipment tables when using the
Windows theme, or the fact that when the Rating column in the dive list
is too small some stars will 'bleed' to other columns.


Giuseppe Bilotta (11):
  Remove double include
  [HiDPI] Dynamic StarWidget metrics
  [HiDPI] Dynamic ToolTipItem metrics
  [HiDPI] Make TableView resolution independent
  [HiDPI]: Dynamic dive trip list column widths
  [HiDPI] Define auxiliary functions for metrics
  [HiDPI] actually use defaultIconSize()
  [HiDPI] Unify icon metrics
  [HiDPI] Resolution-independent DiveEventItem icon sizes
  [HiDPI] Resolution-indepent dive pictures
  [HiDPI] Resolution-independent trash icon

 qt-ui/divelistview.cpp            | 59 +++++++++++++++++++++++++++++++++++----
 qt-ui/divepicturewidget.cpp       |  5 +++-
 qt-ui/diveplanner.cpp             |  8 +++++-
 qt-ui/groupedlineedit.cpp         |  1 -
 qt-ui/metrics.cpp                 | 50 +++++++++++++++++++++++++++++++++
 qt-ui/metrics.h                   | 32 +++++++++++++++++++++
 qt-ui/modeldelegates.cpp          | 14 ++++++++--
 qt-ui/modeldelegates.h            |  2 ++
 qt-ui/models.cpp                  | 43 +++++++++++++++++++++-------
 qt-ui/models.h                    |  7 +++--
 qt-ui/profile/diveeventitem.cpp   |  9 ++++--
 qt-ui/profile/divetooltipitem.cpp | 40 +++++++++++++++-----------
 qt-ui/profile/divetooltipitem.h   |  6 ----
 qt-ui/starwidget.cpp              | 18 ++++++++----
 qt-ui/starwidget.h                |  2 --
 qt-ui/tableview.cpp               | 32 ++++++++++++++++-----
 qt-ui/tableview.h                 | 11 ++++++++
 subsurface.pro                    |  2 ++
 18 files changed, 278 insertions(+), 63 deletions(-)
 create mode 100644 qt-ui/metrics.cpp
 create mode 100644 qt-ui/metrics.h

-- 
2.1.0.255.gcd10c46



More information about the subsurface mailing list