Compare commits

...

9 Commits

Author SHA1 Message Date
Jacopo De Simoi a50d19e80c Make sizegrip larger 8 years ago
Jacopo De Simoi 9e47fa5c9d Make decoration of size 1px again 8 years ago
Jacopo De Simoi 7abcb51348 Size grip is back 8 years ago
Jacopo De Simoi bb3727e936 Merge conflicts by hand 8 years ago
Jacopo De Simoi 67b6926d14 Revert "add a frame with the shadows" 8 years ago
Jacopo De Simoi 7bf86a6e2d Add red border sizegrip 8 years ago
Jacopo De Simoi 97b77837af Add solarized cursors 8 years ago
Jacopo De Simoi 95c1f8d472 add a frame with the shadows 8 years ago
Jacopo De Simoi 3d8d5ffa5f remove shadow offset 8 years ago
  1. 6
      cursors/Breeze/build.sh
  2. 390
      cursors/Breeze/src/cursors.svg
  3. 59
      kdecoration/breezedecoration.cpp
  4. 2
      kdecoration/breezesizegrip.h
  5. 1
      kstyle/breezestyle.cpp

@ -69,7 +69,7 @@ for CUR in src/config/*.cursor; do
fi
if [ "$DIR2X/$BASENAME.png" -ot $RAWSVG ] ; then
inkscape -i $BASENAME -d 180 -f $RAWSVG -e "$DIR2X/$BASENAME.png" > /dev/null
inkscape -i $BASENAME -d 135 -f $RAWSVG -e "$DIR2X/$BASENAME.png" > /dev/null
fi
done
echo -e "\033[0KGenerating simple cursor pixmaps... DONE"
@ -89,7 +89,7 @@ do
fi
if [ "$DIR2X/progress-$i.png" -ot $RAWSVG ] ; then
inkscape -i progress-$i -d 180 -f $RAWSVG -e "$DIR2X/progress-$i.png" > /dev/null
inkscape -i progress-$i -d 135 -f $RAWSVG -e "$DIR2X/progress-$i.png" > /dev/null
fi
if [ "$DIR1X/wait-$i.png" -ot $RAWSVG ] ; then
@ -101,7 +101,7 @@ do
fi
if [ "$DIR2X/wait-$i.png" -ot $RAWSVG ] ; then
inkscape -i wait-$i -d 180 -f $RAWSVG -e "$DIR2X/wait-$i.png" > /dev/null
inkscape -i wait-$i -d 135 -f $RAWSVG -e "$DIR2X/wait-$i.png" > /dev/null
fi
done
echo -e "\033[0KGenerating animated cursor pixmaps... DONE"

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 477 KiB

After

Width:  |  Height:  |  Size: 477 KiB

@ -106,14 +106,17 @@ namespace Breeze
{
auto c = client().data();
if( hideTitleBar() ) return c->color( ColorGroup::Inactive, ColorRole::TitleBar );
else if( m_animation->state() == QPropertyAnimation::Running )
{
return KColorUtils::mix(
c->color( ColorGroup::Inactive, ColorRole::TitleBar ),
c->color( ColorGroup::Active, ColorRole::TitleBar ),
m_opacity );
} else return c->color( c->isActive() ? ColorGroup::Active : ColorGroup::Inactive, ColorRole::TitleBar );
// if( hideTitleBar() ) return c->color( ColorGroup::Inactive, ColorRole::TitleBar );
//else
// if( m_animation->state() == QPropertyAnimation::Running )
// {
// return KColorUtils::mix(
// c->color( ColorGroup::Inactive, ColorRole::TitleBar ),
// c->color( ColorGroup::Active, ColorRole::TitleBar ),
// m_opacity );
// }
// else
return c->color( c->isActive() ? ColorGroup::Active : ColorGroup::Inactive, ColorRole::TitleBar ); //
}
@ -239,20 +242,20 @@ namespace Breeze
{
auto c = client().data();
if( m_sizeGrip )
{ m_sizeGrip->setVisible( c->isResizeable() && !isMaximized() && !c->isShaded() ); }
{ m_sizeGrip->setVisible( c->isActive() && !c->isShaded() ); }
}
//________________________________________________________________
int Decoration::borderSize(bool bottom) const
{
const int baseSize = settings()->smallSpacing();
const int baseSize = settings()->smallSpacing()*0.50;
if( m_internalSettings && (m_internalSettings->mask() & BorderSize ) )
{
switch (m_internalSettings->borderSize()) {
case InternalSettings::BorderNone: return 0;
case InternalSettings::BorderNoSides: return bottom ? qMax(4, baseSize) : 0;
case InternalSettings::BorderNoSides: return bottom ? baseSize : 0;
default:
case InternalSettings::BorderTiny: return bottom ? qMax(4, baseSize) : baseSize;
case InternalSettings::BorderTiny: return baseSize;
case InternalSettings::BorderNormal: return baseSize*2;
case InternalSettings::BorderLarge: return baseSize*3;
case InternalSettings::BorderVeryLarge: return baseSize*4;
@ -265,9 +268,9 @@ namespace Breeze
switch (settings()->borderSize()) {
case KDecoration2::BorderSize::None: return 0;
case KDecoration2::BorderSize::NoSides: return bottom ? qMax(4, baseSize) : 0;
case KDecoration2::BorderSize::NoSides: return bottom ? baseSize : 0;
default:
case KDecoration2::BorderSize::Tiny: return bottom ? qMax(4, baseSize) : baseSize;
case KDecoration2::BorderSize::Tiny: return baseSize;
case KDecoration2::BorderSize::Normal: return baseSize*2;
case KDecoration2::BorderSize::Large: return baseSize*3;
case KDecoration2::BorderSize::VeryLarge: return baseSize*4;
@ -296,7 +299,7 @@ namespace Breeze
createShadow();
// size grip
if( hasNoBorders() && m_internalSettings->drawSizeGrip() ) createSizeGrip();
if( m_internalSettings->drawSizeGrip() ) createSizeGrip();
else deleteSizeGrip();
}
@ -447,8 +450,21 @@ namespace Breeze
// clip away the top part
if( !hideTitleBar() ) painter->setClipRect(0, borderTop(), size().width(), size().height() - borderTop(), Qt::IntersectClip);
if( s->isAlphaChannelSupported() ) painter->drawRoundedRect(rect(), Metrics::Frame_FrameRadius, Metrics::Frame_FrameRadius);
else painter->drawRect( rect() );
//if( s->isAlphaChannelSupported() ) painter->drawRoundedRect(rect(), Metrics::Frame_FrameRadius/2, Metrics::Frame_FrameRadius/2);
//else
// // Go sharper; no rounded edges
painter->drawRect( rect() );
if (c->isActive()) {
painter->setPen( c->color( ColorGroup::Active, ColorRole::TitleBar ) );
QPointF p=rect().bottomRight()+QPointF(0.5, 0.5);
const int sizeGripSize = 18; //this sucks
QPointF q=p-QPoint(0, sizeGripSize);
QPointF r=p-QPoint(sizeGripSize, 0);
painter->drawLine( p, q );
painter->drawLine( p, r );
}
painter->restore();
}
@ -460,8 +476,8 @@ namespace Breeze
painter->save();
painter->setRenderHint(QPainter::Antialiasing, false);
painter->setBrush( Qt::NoBrush );
painter->setPen( c->isActive() ?
c->color( ColorGroup::Active, ColorRole::TitleBar ):
painter->setPen( //c->isActive() ?
//c->color( ColorGroup::Active, ColorRole::TitleBar ):
c->color( ColorGroup::Inactive, ColorRole::Foreground ) );
painter->drawRect( rect().adjusted( 0, 0, -1, -1 ) );
@ -650,7 +666,7 @@ namespace Breeze
}
// offset
int shadowOffset = (g_shadowSizeEnum == InternalSettings::ShadowNone) ? 0 : qMax( 6*shadowSize/16, Metrics::Shadow_Overlap*2 );
const int shadowOffset = 0; //qMax( 6*g_shadowSize/16, Metrics::Shadow_Overlap*2 );
// create image
QImage image(2*shadowSize, 2*shadowSize, QImage::Format_ARGB32_Premultiplied);
@ -690,9 +706,9 @@ namespace Breeze
// contrast pixel
QRectF innerRect = QRectF(
shadowSize - Metrics::Shadow_Overlap, shadowSize - shadowOffset - Metrics::Shadow_Overlap,
2*Metrics::Shadow_Overlap, shadowOffset + 2*Metrics::Shadow_Overlap );
painter.setPen( gradientStopColor( g_shadowColor, (g_shadowSizeEnum == InternalSettings::ShadowNone) ? g_shadowStrength:(g_shadowStrength*0.5) ) );
painter.setBrush( Qt::NoBrush );
painter.drawRoundedRect( innerRect, -0.5 + Metrics::Frame_FrameRadius, -0.5 + Metrics::Frame_FrameRadius );
@ -743,6 +759,7 @@ namespace Breeze
connect( c, &KDecoration2::DecoratedClient::maximizedChanged, this, &Decoration::updateSizeGripVisibility );
connect( c, &KDecoration2::DecoratedClient::shadedChanged, this, &Decoration::updateSizeGripVisibility );
connect( c, &KDecoration2::DecoratedClient::resizeableChanged, this, &Decoration::updateSizeGripVisibility );
connect( c, &KDecoration2::DecoratedClient::activeChanged, this, &Decoration::updateSizeGripVisibility );
}
#endif

@ -81,7 +81,7 @@ namespace Breeze
//* grip size
enum {
Offset = 0,
GripSize = 14
GripSize = 18
};
//* decoration

@ -5659,7 +5659,6 @@ namespace Breeze
color = (documentMode&&!isQtQuickControl&&!hasAlteredBackground(widget)) ? palette.color( QPalette::Window ) : _helper->frameBackgroundColor( palette );
} else {
const auto normal( _helper->alphaColor( palette.color( QPalette::Shadow ), 0.2 ) );
const auto hover( _helper->alphaColor( _helper->hoverColor( palette ), 0.2 ) );
if( animated ) color = KColorUtils::mix( normal, hover, opacity );

Loading…
Cancel
Save