On Friday 12 September 2008 18:00:46 Aaron J. Seigo wrote: > patches are looking good =)
On more thing... Dashboard widgets (& SuperKaramba etc.) are fixed size so it would be nice to be able to remove resize button for those. This patch adds FixedSize to AspectRatioMode to do that. Petri
Index: plasma.h
===================================================================
--- plasma.h (revision 860594)
+++ plasma.h (working copy)
@@ -182,7 +182,8 @@
IgnoreAspectRatio = 0 /**< The applet can be freely resized */,
KeepAspectRatio = 1 /**< The applet keeps a fixed aspect ratio */,
Square = 2 /**< The applet is always a square */,
- ConstrainedSquare = 3 /** The applet is no wider (in horizontal formfactors) or no higher (in vertical ones) than a square*/
+ ConstrainedSquare = 3 /** The applet is no wider (in horizontal formfactors) or no higher (in vertical ones) than a square */,
+ FixedSize = 4 /** The applet cannot be resized */
};
/**
Index: private/applethandle.cpp
===================================================================
--- private/applethandle.cpp (revision 860594)
+++ private/applethandle.cpp (working copy)
@@ -275,9 +275,10 @@
break;
}
+ if (m_applet && m_applet->aspectRatioMode() != FixedSize) {
painter->drawPixmap(basePoint + shiftM, SmallIcon("transform-scale")); //FIXME no transform-resize icon
-
basePoint += step;
+ }
painter->drawPixmap(basePoint + shiftR, SmallIcon("transform-rotate"));
if (m_applet && m_applet->hasConfigurationInterface()) {
@@ -302,11 +303,13 @@
QRectF activeArea = QRectF(basePoint, QSizeF(m_iconSize, m_iconSize));
+ if (m_applet && m_applet->aspectRatioMode() != FixedSize) {
if (activeArea.contains(point)) {
return ResizeButton;
}
+ activeArea.translate(step);
+ }
- activeArea.translate(step);
if (activeArea.contains(point)) {
return RotateButton;
}
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/plasma-devel
