wok annotate qtpanel/stuff/p.diff @ rev 20615

Update varka
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Dec 21 20:44:57 2018 +0100 (2018-12-21)
parents
children
rev   line source
psychomaniak@17164 1 --- orig/applicationsmenuapplet.cpp
psychomaniak@17164 2 +++ edit/applicationsmenuapplet.cpp
psychomaniak@17164 3 @@ -96 +96 @@
psychomaniak@17164 4 - return QSize(m_textItem->boundingRect().size().width() + 16, m_textItem->boundingRect().size().height());
psychomaniak@17164 5 + return QSize(m_textItem->boundingRect().size().width() + 8, m_textItem->boundingRect().size().height());
psychomaniak@17164 6 --- orig/clockapplet.cpp
psychomaniak@17164 7 +++ edit/clockapplet.cpp
psychomaniak@17164 8 @@ -42 +42 @@
psychomaniak@17164 9 - m_text = dateTimeNow.toString();
psychomaniak@17164 10 + m_text = dateTimeNow.toString("ddd ddMMM hh:mm");
psychomaniak@17164 11 @@ -50 +50 @@
psychomaniak@17164 12 - return QSize(m_textItem->boundingRect().width() + 16, m_textItem->boundingRect().height() + 16);
psychomaniak@17164 13 + return QSize(m_textItem->boundingRect().width() + 2, m_textItem->boundingRect().height() + 16);
psychomaniak@17164 14 --- orig/dockapplet.cpp
psychomaniak@17164 15 +++ edit/dockapplet.cpp
psychomaniak@17164 16 @@ -8,0 +9 @@
psychomaniak@17164 17 +#include <QtGui/QWheelEvent>
psychomaniak@17164 18 @@ -56 +57 @@
psychomaniak@17164 19 - QString shortName = fontMetrics.elidedText(m_clients[0]->name(), Qt::ElideRight, m_targetSize.width() - adjustHardcodedPixelSize(36));
psychomaniak@17164 20 + QString shortName = fontMetrics.elidedText(m_clients[0]->name(), Qt::ElideRight, m_targetSize.width() - adjustHardcodedPixelSize(25));
psychomaniak@17164 21 @@ -60,2 +61,2 @@
psychomaniak@17164 22 - m_iconItem->setPixmap(m_clients[0]->icon().pixmap(adjustHardcodedPixelSize(16)));
psychomaniak@17164 23 - m_iconItem->setPos(adjustHardcodedPixelSize(8), m_targetSize.height()/2 - adjustHardcodedPixelSize(8));
psychomaniak@17164 24 + m_iconItem->setPixmap(m_clients[0]->icon().pixmap(adjustHardcodedPixelSize(22)));
psychomaniak@17164 25 + m_iconItem->setPos(adjustHardcodedPixelSize(4), m_targetSize.height()/8 + adjustHardcodedPixelSize(2));
psychomaniak@17164 26 @@ -162 +163 @@
psychomaniak@17164 27 - return QRectF(0.0, 0.0, m_size.width() - 1, m_size.height() - 1);
psychomaniak@17164 28 + return QRectF(0.0, 0.0, m_size.width() - 1, m_size.height());
psychomaniak@17164 29 @@ -244,0 +246,24 @@
psychomaniak@17164 30 + }
psychomaniak@17164 31 + }
psychomaniak@17164 32 +}
psychomaniak@17164 33 +
psychomaniak@17164 34 +void DockItem::wheelEvent(QGraphicsSceneWheelEvent *event)
psychomaniak@17164 35 +{
psychomaniak@17164 36 + int numDegrees = event->delta() / 8;
psychomaniak@17164 37 + int numSteps = numDegrees / 15;
psychomaniak@17164 38 +
psychomaniak@17164 39 + // Ignore accidental scroll events if currently dragging.
psychomaniak@17164 40 + if(m_dragging)
psychomaniak@17164 41 + return;
psychomaniak@17164 42 +
psychomaniak@17164 43 + if (event->orientation() == Qt::Horizontal) { // Horizontal: switch between tasks
psychomaniak@17164 44 + // scrollHorizontally(numSteps);
psychomaniak@17164 45 + } else { // Vertical scroll: (un)roll the hovered task
psychomaniak@17164 46 + if( numSteps > 0 )
psychomaniak@17164 47 + {
psychomaniak@17164 48 + X11Support::activateWindow(m_clients[0]->handle());
psychomaniak@17164 49 + }
psychomaniak@17164 50 + else
psychomaniak@17164 51 + {
psychomaniak@17164 52 + if(m_dockApplet->activeWindow() == m_clients[0]->handle())
psychomaniak@17164 53 + X11Support::minimizeWindow(m_clients[0]->handle());
psychomaniak@17164 54 --- orig/dockapplet.h
psychomaniak@17164 55 +++ edit/dockapplet.h
psychomaniak@17164 56 @@ -7,0 +8 @@
psychomaniak@17164 57 +#include <QtGui/QWheelEvent>
psychomaniak@17164 58 @@ -49,0 +51 @@
psychomaniak@17164 59 + void wheelEvent(QGraphicsSceneWheelEvent *event);
psychomaniak@17164 60 --- orig/dpisupport.cpp
psychomaniak@17164 61 +++ edit/dpisupport.cpp
psychomaniak@17164 62 @@ -9 +9 @@
psychomaniak@17164 63 - return size*dpi/96;
psychomaniak@17164 64 + return size*dpi/125;
psychomaniak@17164 65 --- orig/panelapplication.cpp
psychomaniak@17164 66 +++ edit/panelapplication.cpp
psychomaniak@17164 67 @@ -73,2 +73,2 @@
psychomaniak@17164 68 - setFontName(settings.value("fontName", "default").toString());
psychomaniak@17164 69 - setIconThemeName(settings.value("iconThemeName", "default").toString());
psychomaniak@17164 70 + setFontName(settings.value("fontName", "Fixed 8").toString());
psychomaniak@17164 71 + setIconThemeName(settings.value("iconThemeName", "SliTaz").toString());