[PATCH] profile-widget: use smaller event icons on Subsurface-mobile

Rick Walsh rickmwalsh at gmail.com
Fri Feb 5 21:43:43 PST 2016


Smaller event icons fit the mobile display much nicer

Signed-off-by: Rick Walsh <rickmwalsh at gmail.com>
---

I've attached before and after screenshots.

 profile-widget/diveeventitem.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/profile-widget/diveeventitem.cpp
b/profile-widget/diveeventitem.cpp
index 083c8b5..1986015 100644
--- a/profile-widget/diveeventitem.cpp
+++ b/profile-widget/diveeventitem.cpp
@@ -63,7 +63,11 @@ void DiveEventItem::setEvent(struct event *ev)
 void DiveEventItem::setupPixmap()
 {
     const IconMetrics& metrics = defaultIconMetrics();
+#ifndef SUBSURFACE_MOBILE
     int sz_bigger = metrics.sz_med + metrics.sz_small; // ex 40px
+#else
+    int sz_bigger = metrics.sz_med;
+#endif
     int sz_pix = sz_bigger/2; // ex 20px

 #define EVENT_PIXMAP(PIX) QPixmap(QString(PIX)).scaled(sz_pix, sz_pix,
Qt::KeepAspectRatio, Qt::SmoothTransformation)
-- 
2.5.0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160206/ae46ce06/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: after - smaller event icons.png
Type: image/png
Size: 74405 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160206/ae46ce06/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: before - big event icons.png
Type: image/png
Size: 76975 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160206/ae46ce06/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-profile-widget-use-smaller-event-icons-on-Subsurface.patch
Type: text/x-patch
Size: 1069 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20160206/ae46ce06/attachment-0001.bin>


More information about the subsurface mailing list