update plasma 5.2.0 (cont breeze,oxygen-kde4)

This commit is contained in:
Weng Xuetian 2015-01-28 04:57:41 +00:00
parent cd96a452ee
commit 4b3436f837
2 changed files with 37 additions and 3 deletions

View File

@ -3,7 +3,7 @@
source ../plasma.conf
pkgname=breeze
pkgver=${PVersion}
pkgver=${PSubVersion}
pkgrel=1
pkgdesc='A plasma theme'
arch=('x86_64')
@ -14,11 +14,16 @@ makedepends=('extra-cmake-modules')
checkdepends=("cmake")
groups=('plasma')
options=("debug")
source=("${PServer}/${pkgver}/${pkgname}-${PSubVersion}.tar.xz")
sha256sums=( $(getSum ${pkgname}) )
source=("${PServer}/${pkgver}/${pkgname}-${pkgver}.tar.xz"
"maximize-window-button.patch")
sha256sums=( $(getSum ${pkgname})
'694444a32cbb7cf368f9933f39083508eedb3c39028f12caeba9d5e839c0d39e')
prepare() {
mkdir -p build
cd ${pkgname}-${PSubVersion}
patch -Np1 -i ../maximize-window-button.patch
}
build() {

View File

@ -0,0 +1,29 @@
diff --git a/kdecoration/breezebutton.cpp b/kdecoration/breezebutton.cpp
index 25aa273..0f20346 100644
--- a/kdecoration/breezebutton.cpp
+++ b/kdecoration/breezebutton.cpp
@@ -87,11 +87,13 @@ namespace Breeze
// translate from offset
if( m_flag == FlagFirstInList ) painter->translate( m_offset );
else painter->translate( 0, m_offset.y() );
+ painter->translate( geometry().topLeft() );
if (type() == KDecoration2::DecorationButtonType::Menu)
{
- const QPixmap pixmap = decoration()->client().data()->icon().pixmap(size().toSize());
- painter->drawPixmap(geometry().center() - QPoint(pixmap.width()/2, pixmap.height()/2), pixmap);
+ const qreal width( geometry().width() - m_offset.x() );
+ const QPixmap pixmap = decoration()->client().data()->icon().pixmap(QSizeF(width, width).toSize());
+ painter->drawPixmap(0, 0, pixmap);
} else {
@@ -114,8 +116,6 @@ namespace Breeze
this makes all further rendering and scaling simpler
all further rendering is preformed inside QRect( 0, 0, 18, 18 )
*/
- painter->translate( geometry().topLeft() );
-
const qreal width( geometry().width() - m_offset.x() );
painter->scale( width/20, width/20 );
painter->translate( 1, 1 );