wok view qtpanel/stuff/p.diff @ rev 25037

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