mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-27 20:58:47 +00:00
mobile: better scaling of profile items
With all the recent changes, some of the previous assumptions about the scale of items seem to be no longer appropriate. Now that we are showing the icons in the profile again on device it's quite obvious that they were way too big - clearly we don't need the special scaling anymore. Also implement a suggestion from Berthold to get slightly smaller fonts and finer structures in the profile on mobile devices. This scaling of the DPR seems to work well in my tests. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
69cb33fd2e
commit
c2a7382b10
2 changed files with 1 additions and 7 deletions
|
@ -20,13 +20,7 @@ DivePixmaps::DivePixmaps(int dpr) : dpr(dpr)
|
|||
extern int verbose;
|
||||
double dprf = dpr / 100.0;
|
||||
const IconMetrics &metrics = defaultIconMetrics();
|
||||
#ifndef SUBSURFACE_MOBILE
|
||||
int sz_bigger = metrics.sz_med + metrics.sz_small; // ex 40px
|
||||
#else
|
||||
// SUBSURFACE_MOBILE, seems a little big from the code,
|
||||
// but looks fine on device
|
||||
int sz_bigger = metrics.sz_big + metrics.sz_med;
|
||||
#endif
|
||||
sz_bigger = lrint(sz_bigger * dprf);
|
||||
int sz_pix = sz_bigger / 2; // ex 20px
|
||||
if (verbose)
|
||||
|
|
|
@ -31,7 +31,7 @@ QMLProfile::~QMLProfile()
|
|||
|
||||
void QMLProfile::createProfileView()
|
||||
{
|
||||
m_profileWidget.reset(new ProfileScene(m_devicePixelRatio, false, false));
|
||||
m_profileWidget.reset(new ProfileScene(m_devicePixelRatio * 0.8, false, false));
|
||||
}
|
||||
|
||||
// we need this so we can connect update() to the scaleChanged() signal - which the connect above cannot do
|
||||
|
|
Loading…
Reference in a new issue