fix #93,masking updated correctly on config win

--this can be tested by opening the configuration window
through the tasks. Even though a task is zoomed when
triggering the configuration window the animations
do not break afterwards
v0.6
Michail Vourlakos 8 years ago
parent 06ef3a0cb8
commit f91f9f26ce

@ -108,10 +108,10 @@ void DockConfigView::syncGeometry()
if (location == Plasma::Types::TopEdge) {
setPosition(sGeometry.center().x() - size.width() / 2
, m_dockView->currentThickness());
, m_dockView->normalThickness());
} else if (location == Plasma::Types::BottomEdge) {
setPosition(sGeometry.center().x() - size.width() / 2
, sGeometry.height() - m_dockView->currentThickness() - size.height());
, sGeometry.height() - m_dockView->normalThickness() - size.height());
}
}
break;

@ -322,6 +322,22 @@ int DockView::currentThickness() const
}
}
int DockView::normalThickness() const
{
return m_normalThickness;
}
void DockView::setNormalThickness(int thickness)
{
if (m_normalThickness == thickness) {
return;
}
m_normalThickness = thickness;
emit normalThicknessChanged();
}
int DockView::docksCount() const
{
auto dockCorona = qobject_cast<DockCorona *>(corona());

@ -48,6 +48,7 @@ class DockView : public PlasmaQuick::ContainmentView {
Q_PROPERTY(int height READ height NOTIFY heightChanged)
Q_PROPERTY(int maxLength READ maxLength WRITE setMaxLength NOTIFY maxLengthChanged)
Q_PROPERTY(int maxThickness READ maxThickness WRITE setMaxThickness NOTIFY maxThicknessChanged)
Q_PROPERTY(int normalThickness READ normalThickness WRITE setNormalThickness NOTIFY normalThicknessChanged)
Q_PROPERTY(int shadow READ shadow WRITE setShadow NOTIFY shadowChanged)
Q_PROPERTY(QRect maskArea READ maskArea WRITE setMaskArea NOTIFY maskAreaChanged)
@ -76,6 +77,9 @@ public:
int maxThickness() const;
void setMaxThickness(int thickness);
int normalThickness() const;
void setNormalThickness(int thickness);
int shadow() const;
void setShadow(int shadow);
@ -118,6 +122,7 @@ signals:
void heightChanged();
void maxLengthChanged();
void maxThicknessChanged();
void normalThicknessChanged();
void visibilityChanged();
void maskAreaChanged();
void shadowChanged();
@ -141,6 +146,7 @@ private:
int m_maxLength{INT_MAX};
int m_maxThickness{24};
int m_normalThickness{24};
int m_shadow{0};
QRect m_localDockGeometry;

@ -66,6 +66,13 @@ Item{
value: thicknessZoomOriginal
}
Binding{
target: dock
property:"normalThickness"
when: dock
value: thicknessNormalOriginal
}
onInStartupChanged: {
if (!inStartup) {
delayAnimationTimer.start();
@ -80,7 +87,6 @@ Item{
onThicknessZoomOriginalChanged: updateMaskArea();
function slotContainsMouseChanged() {
if(dock.visibility.containsMouse) {
if (delayerTimer.running) {
@ -134,7 +140,7 @@ Item{
var space = root.useThemePanel ? root.panelEdgeSpacing + 2*root.shadowsSize : 2;
if (normalState && !root.editMode) {
if (normalState) {
//console.log("entered normal state...");
//count panel length
if(root.isHorizontal) {
@ -194,7 +200,7 @@ Item{
tempLength = Screen.height; //screenGeometry.height;
//grow only on length and not thickness
if(root.editMode || (root.animationsNeedLength>0 && root.animationsNeedBothAxis === 0)) {
if(root.animationsNeedLength>0 && root.animationsNeedBothAxis === 0) {
//this is used to fix a bug with shadow showing when the animation of edit mode
//is triggered

Loading…
Cancel
Save