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) { if (location == Plasma::Types::TopEdge) {
setPosition(sGeometry.center().x() - size.width() / 2 setPosition(sGeometry.center().x() - size.width() / 2
, m_dockView->currentThickness()); , m_dockView->normalThickness());
} else if (location == Plasma::Types::BottomEdge) { } else if (location == Plasma::Types::BottomEdge) {
setPosition(sGeometry.center().x() - size.width() / 2 setPosition(sGeometry.center().x() - size.width() / 2
, sGeometry.height() - m_dockView->currentThickness() - size.height()); , sGeometry.height() - m_dockView->normalThickness() - size.height());
} }
} }
break; 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 int DockView::docksCount() const
{ {
auto dockCorona = qobject_cast<DockCorona *>(corona()); 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 height READ height NOTIFY heightChanged)
Q_PROPERTY(int maxLength READ maxLength WRITE setMaxLength NOTIFY maxLengthChanged) Q_PROPERTY(int maxLength READ maxLength WRITE setMaxLength NOTIFY maxLengthChanged)
Q_PROPERTY(int maxThickness READ maxThickness WRITE setMaxThickness NOTIFY maxThicknessChanged) 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(int shadow READ shadow WRITE setShadow NOTIFY shadowChanged)
Q_PROPERTY(QRect maskArea READ maskArea WRITE setMaskArea NOTIFY maskAreaChanged) Q_PROPERTY(QRect maskArea READ maskArea WRITE setMaskArea NOTIFY maskAreaChanged)
@ -76,6 +77,9 @@ public:
int maxThickness() const; int maxThickness() const;
void setMaxThickness(int thickness); void setMaxThickness(int thickness);
int normalThickness() const;
void setNormalThickness(int thickness);
int shadow() const; int shadow() const;
void setShadow(int shadow); void setShadow(int shadow);
@ -118,6 +122,7 @@ signals:
void heightChanged(); void heightChanged();
void maxLengthChanged(); void maxLengthChanged();
void maxThicknessChanged(); void maxThicknessChanged();
void normalThicknessChanged();
void visibilityChanged(); void visibilityChanged();
void maskAreaChanged(); void maskAreaChanged();
void shadowChanged(); void shadowChanged();
@ -141,6 +146,7 @@ private:
int m_maxLength{INT_MAX}; int m_maxLength{INT_MAX};
int m_maxThickness{24}; int m_maxThickness{24};
int m_normalThickness{24};
int m_shadow{0}; int m_shadow{0};
QRect m_localDockGeometry; QRect m_localDockGeometry;

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

Loading…
Cancel
Save