wok diff qtpanel/stuff/p.diff @ rev 24514

created recipe for elspci
author Hans-G?nter Theisgen
date Mon Feb 21 15:26:14 2022 +0100 (2022-02-21)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/qtpanel/stuff/p.diff	Mon Feb 21 15:26:14 2022 +0100
     1.3 @@ -0,0 +1,71 @@
     1.4 +--- orig/applicationsmenuapplet.cpp
     1.5 ++++ edit/applicationsmenuapplet.cpp
     1.6 +@@ -96 +96 @@
     1.7 +-	return QSize(m_textItem->boundingRect().size().width() + 16, m_textItem->boundingRect().size().height());
     1.8 ++	return QSize(m_textItem->boundingRect().size().width() + 8, m_textItem->boundingRect().size().height());
     1.9 +--- orig/clockapplet.cpp
    1.10 ++++ edit/clockapplet.cpp
    1.11 +@@ -42 +42 @@
    1.12 +-	m_text = dateTimeNow.toString();
    1.13 ++	m_text = dateTimeNow.toString("ddd ddMMM hh:mm");
    1.14 +@@ -50 +50 @@
    1.15 +-	return QSize(m_textItem->boundingRect().width() + 16, m_textItem->boundingRect().height() + 16);
    1.16 ++	return QSize(m_textItem->boundingRect().width() + 2, m_textItem->boundingRect().height() + 16);
    1.17 +--- orig/dockapplet.cpp
    1.18 ++++ edit/dockapplet.cpp
    1.19 +@@ -8,0 +9 @@
    1.20 ++#include <QtGui/QWheelEvent>
    1.21 +@@ -56 +57 @@
    1.22 +-	QString shortName = fontMetrics.elidedText(m_clients[0]->name(), Qt::ElideRight, m_targetSize.width() - adjustHardcodedPixelSize(36));
    1.23 ++	QString shortName = fontMetrics.elidedText(m_clients[0]->name(), Qt::ElideRight, m_targetSize.width() - adjustHardcodedPixelSize(25));
    1.24 +@@ -60,2 +61,2 @@
    1.25 +-	m_iconItem->setPixmap(m_clients[0]->icon().pixmap(adjustHardcodedPixelSize(16)));
    1.26 +-	m_iconItem->setPos(adjustHardcodedPixelSize(8), m_targetSize.height()/2 - adjustHardcodedPixelSize(8));
    1.27 ++	m_iconItem->setPixmap(m_clients[0]->icon().pixmap(adjustHardcodedPixelSize(22)));
    1.28 ++	m_iconItem->setPos(adjustHardcodedPixelSize(4), m_targetSize.height()/8 + adjustHardcodedPixelSize(2));
    1.29 +@@ -162 +163 @@
    1.30 +-	return QRectF(0.0, 0.0, m_size.width() - 1, m_size.height() - 1);
    1.31 ++	return QRectF(0.0, 0.0, m_size.width() - 1, m_size.height());
    1.32 +@@ -244,0 +246,24 @@
    1.33 ++		}
    1.34 ++	}
    1.35 ++}
    1.36 ++
    1.37 ++void DockItem::wheelEvent(QGraphicsSceneWheelEvent *event)
    1.38 ++{
    1.39 ++	int numDegrees = event->delta() / 8;
    1.40 ++	int numSteps = numDegrees / 15;
    1.41 ++
    1.42 ++	// Ignore accidental scroll events if currently dragging.
    1.43 ++	if(m_dragging)
    1.44 ++		return;
    1.45 ++
    1.46 ++	if (event->orientation() == Qt::Horizontal) { // Horizontal: switch between tasks
    1.47 ++		// scrollHorizontally(numSteps);
    1.48 ++	} else { // Vertical scroll: (un)roll the hovered task
    1.49 ++		if( numSteps > 0 )
    1.50 ++		{
    1.51 ++			X11Support::activateWindow(m_clients[0]->handle());
    1.52 ++		}
    1.53 ++		else
    1.54 ++		{
    1.55 ++			if(m_dockApplet->activeWindow() == m_clients[0]->handle())
    1.56 ++				X11Support::minimizeWindow(m_clients[0]->handle());
    1.57 +--- orig/dockapplet.h
    1.58 ++++ edit/dockapplet.h
    1.59 +@@ -7,0 +8 @@
    1.60 ++#include <QtGui/QWheelEvent>
    1.61 +@@ -49,0 +51 @@
    1.62 ++	void wheelEvent(QGraphicsSceneWheelEvent *event);
    1.63 +--- orig/dpisupport.cpp
    1.64 ++++ edit/dpisupport.cpp
    1.65 +@@ -9 +9 @@
    1.66 +-    return size*dpi/96;
    1.67 ++    return size*dpi/125;
    1.68 +--- orig/panelapplication.cpp
    1.69 ++++ edit/panelapplication.cpp
    1.70 +@@ -73,2 +73,2 @@
    1.71 +-	setFontName(settings.value("fontName", "default").toString());
    1.72 +-	setIconThemeName(settings.value("iconThemeName", "default").toString());
    1.73 ++	setFontName(settings.value("fontName", "Fixed 8").toString());
    1.74 ++	setIconThemeName(settings.value("iconThemeName", "SliTaz").toString());