wok rev 17164

Add qtpanel
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Thu Sep 18 23:48:17 2014 +0200 (2014-09-18)
parents acac28bda8ed
children 828d5fba0ff7
files qtpanel/description.txt qtpanel/receipt qtpanel/stuff/autostart/qtpanel.desktop qtpanel/stuff/p.diff
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/qtpanel/description.txt	Thu Sep 18 23:48:17 2014 +0200
     1.3 @@ -0,0 +1,15 @@
     1.4 +offdesc:A project to create visual appealing, featured panel (dock) in Qt.
     1.5 +
     1.6 +	wheel to raise/hide items in the taskbar:
     1.7 +	(like in lxpanel)
     1.8 +Used fork (partially) in patch:
     1.9 +	https://github.com/flatr0ze/qtpanel/commit/6d0e029
    1.10 +	
    1.11 + maintainer's patching:
    1.12 +Larger values -> lower panel heigth,
    1.13 + 96->125 in dpisupport
    1.14 +affects imagesize,patching dockapplet
    1.15 +(icons closer to borders).
    1.16 +Removed 1-pixel bottom margin.
    1.17 +Compact items.
    1.18 +Changed QDateTime format.
    1.19 \ No newline at end of file
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/qtpanel/receipt	Thu Sep 18 23:48:17 2014 +0200
     2.3 @@ -0,0 +1,34 @@
     2.4 +# SliTaz package receipt.
     2.5 +
     2.6 +PACKAGE="qtpanel"
     2.7 +VERSION="548e4d3"
     2.8 +CATEGORY="x-window"
     2.9 +SHORT_DESC="Patched: size, scroll wheel min/max taskbar items. virt.desktops NOT supported"
    2.10 +LICENSE="GPL"
    2.11 +WEB_SITE="https://gitorious.org/qtpanel/qtpanel"
    2.12 +MAINTAINER="psychomaniak@xakep.ru"
    2.13 +TARBALL="$PACKAGE-$VERSION.tar.gz"
    2.14 +WGET_URL="$WEB_SITE/archive/$VERSION.tar.gz"
    2.15 +
    2.16 +DEPENDS="libQtGui xorg-libXdamage xorg-libXcomposite"
    2.17 +BUILD_DEPENDS="wget cacerts Qt4-dev qmake cmake"
    2.18 +
    2.19 +# Rules to configure and make the package.
    2.20 +compile_rules()
    2.21 +{
    2.22 +	patch -i $stuff/p.diff --merge		#sed -i 's|ddd ddMMM hh:mm||' clockapplet.cpp
    2.23 +	mkdir b; cd b
    2.24 +	cmake -DCMAKE_BUILD_TYPE=MinSizeRel ..;	make
    2.25 +	mkdir -p $install/usr/bin
    2.26 +	install	$src/b/$PACKAGE $install/usr/bin
    2.27 +	rm -rf	$src/b
    2.28 +}
    2.29 +
    2.30 +# Rules to gen a SliTaz package suitable for Tazpkg.
    2.31 +
    2.32 +genpkg_rules()
    2.33 +{
    2.34 +	cp -a $install/*	$fs
    2.35 +	mkdir -p		$fs/etc/xdg
    2.36 +	cp -a $stuff/autostart	$fs/etc/xdg
    2.37 +}
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/qtpanel/stuff/autostart/qtpanel.desktop	Thu Sep 18 23:48:17 2014 +0200
     3.3 @@ -0,0 +1,4 @@
     3.4 +[Desktop Entry]
     3.5 +Type=Application
     3.6 +Name=QtPanel
     3.7 +Exec=qtpanel
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/qtpanel/stuff/p.diff	Thu Sep 18 23:48:17 2014 +0200
     4.3 @@ -0,0 +1,71 @@
     4.4 +--- orig/applicationsmenuapplet.cpp
     4.5 ++++ edit/applicationsmenuapplet.cpp
     4.6 +@@ -96 +96 @@
     4.7 +-	return QSize(m_textItem->boundingRect().size().width() + 16, m_textItem->boundingRect().size().height());
     4.8 ++	return QSize(m_textItem->boundingRect().size().width() + 8, m_textItem->boundingRect().size().height());
     4.9 +--- orig/clockapplet.cpp
    4.10 ++++ edit/clockapplet.cpp
    4.11 +@@ -42 +42 @@
    4.12 +-	m_text = dateTimeNow.toString();
    4.13 ++	m_text = dateTimeNow.toString("ddd ddMMM hh:mm");
    4.14 +@@ -50 +50 @@
    4.15 +-	return QSize(m_textItem->boundingRect().width() + 16, m_textItem->boundingRect().height() + 16);
    4.16 ++	return QSize(m_textItem->boundingRect().width() + 2, m_textItem->boundingRect().height() + 16);
    4.17 +--- orig/dockapplet.cpp
    4.18 ++++ edit/dockapplet.cpp
    4.19 +@@ -8,0 +9 @@
    4.20 ++#include <QtGui/QWheelEvent>
    4.21 +@@ -56 +57 @@
    4.22 +-	QString shortName = fontMetrics.elidedText(m_clients[0]->name(), Qt::ElideRight, m_targetSize.width() - adjustHardcodedPixelSize(36));
    4.23 ++	QString shortName = fontMetrics.elidedText(m_clients[0]->name(), Qt::ElideRight, m_targetSize.width() - adjustHardcodedPixelSize(25));
    4.24 +@@ -60,2 +61,2 @@
    4.25 +-	m_iconItem->setPixmap(m_clients[0]->icon().pixmap(adjustHardcodedPixelSize(16)));
    4.26 +-	m_iconItem->setPos(adjustHardcodedPixelSize(8), m_targetSize.height()/2 - adjustHardcodedPixelSize(8));
    4.27 ++	m_iconItem->setPixmap(m_clients[0]->icon().pixmap(adjustHardcodedPixelSize(22)));
    4.28 ++	m_iconItem->setPos(adjustHardcodedPixelSize(4), m_targetSize.height()/8 + adjustHardcodedPixelSize(2));
    4.29 +@@ -162 +163 @@
    4.30 +-	return QRectF(0.0, 0.0, m_size.width() - 1, m_size.height() - 1);
    4.31 ++	return QRectF(0.0, 0.0, m_size.width() - 1, m_size.height());
    4.32 +@@ -244,0 +246,24 @@
    4.33 ++		}
    4.34 ++	}
    4.35 ++}
    4.36 ++
    4.37 ++void DockItem::wheelEvent(QGraphicsSceneWheelEvent *event)
    4.38 ++{
    4.39 ++	int numDegrees = event->delta() / 8;
    4.40 ++	int numSteps = numDegrees / 15;
    4.41 ++
    4.42 ++	// Ignore accidental scroll events if currently dragging.
    4.43 ++	if(m_dragging)
    4.44 ++		return;
    4.45 ++
    4.46 ++	if (event->orientation() == Qt::Horizontal) { // Horizontal: switch between tasks
    4.47 ++		// scrollHorizontally(numSteps);
    4.48 ++	} else { // Vertical scroll: (un)roll the hovered task
    4.49 ++		if( numSteps > 0 )
    4.50 ++		{
    4.51 ++			X11Support::activateWindow(m_clients[0]->handle());
    4.52 ++		}
    4.53 ++		else
    4.54 ++		{
    4.55 ++			if(m_dockApplet->activeWindow() == m_clients[0]->handle())
    4.56 ++				X11Support::minimizeWindow(m_clients[0]->handle());
    4.57 +--- orig/dockapplet.h
    4.58 ++++ edit/dockapplet.h
    4.59 +@@ -7,0 +8 @@
    4.60 ++#include <QtGui/QWheelEvent>
    4.61 +@@ -49,0 +51 @@
    4.62 ++	void wheelEvent(QGraphicsSceneWheelEvent *event);
    4.63 +--- orig/dpisupport.cpp
    4.64 ++++ edit/dpisupport.cpp
    4.65 +@@ -9 +9 @@
    4.66 +-    return size*dpi/96;
    4.67 ++    return size*dpi/125;
    4.68 +--- orig/panelapplication.cpp
    4.69 ++++ edit/panelapplication.cpp
    4.70 +@@ -73,2 +73,2 @@
    4.71 +-	setFontName(settings.value("fontName", "default").toString());
    4.72 +-	setIconThemeName(settings.value("iconThemeName", "default").toString());
    4.73 ++	setFontName(settings.value("fontName", "Fixed 8").toString());
    4.74 ++	setIconThemeName(settings.value("iconThemeName", "SliTaz").toString());