livemode:enable parabolic effect for editMode

--first commit to restructure editMode in order to
support livemode under editing. Live mode means
that all options changes during editMode will be
available to be tested directly
pull/5/head
Michail Vourlakos 6 years ago
parent cf0182e827
commit b15df34cc4

@ -152,7 +152,7 @@ void PrimaryConfigView::init()
inline Qt::WindowFlags PrimaryConfigView::wFlags() const
{
return (flags() | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint) & ~Qt::WindowDoesNotAcceptFocus;
return (flags() | Qt::FramelessWindowHint) & ~Qt::WindowDoesNotAcceptFocus;
}
QWindow *PrimaryConfigView::secondaryWindow()

@ -133,7 +133,7 @@ void SecondaryConfigView::init()
inline Qt::WindowFlags SecondaryConfigView::wFlags() const
{
return (flags() | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint) & ~Qt::WindowDoesNotAcceptFocus;
return (flags() | Qt::FramelessWindowHint) & ~Qt::WindowDoesNotAcceptFocus;
}
QRect SecondaryConfigView::geometryWhenVisible() const

@ -31,7 +31,8 @@ MouseArea {
z: 1000
anchors.fill: parent
hoverEnabled: true
enabled: false
// hoverEnabled: true
cursorShape: {
if (currentApplet && tooltip.visible && currentApplet.applet
@ -146,9 +147,9 @@ MouseArea {
var relevantLayout = mapFromItem(layoutsContainer.mainLayout, 0, 0);
handle.x = relevantLayout.x + currentApplet.x;
handle.y = relevantLayout.y + currentApplet.y;
handle.y = relevantLayout.y + currentApplet.y + currentApplet.height / 2;
handle.width = currentApplet.width;
handle.height = currentApplet.height;
handle.height = currentApplet.height / 2;
lockButton.checked = currentApplet.lockZoom;
colorizingButton.checked = !currentApplet.userBlocksColorizing;
@ -294,9 +295,9 @@ MouseArea {
var transformChoords = root.mapFromItem(currentApplet, 0, 0)
handle.x = transformChoords.x;
handle.y = transformChoords.y;
handle.y = transformChoords.y + currentApplet.height / 2;
handle.width = currentApplet.width;
handle.height = currentApplet.height;
handle.height = currentApplet.height / 2;
repositionHandler.restart();
}
@ -416,14 +417,14 @@ MouseArea {
label.text = currentApplet.isInternalViewSplitter ? i18n("Justify Splitter") : currentApplet.applet.title;
} else {
if (currentApplet === ruler) {
/* if (currentApplet === ruler) {
configureButton.visible = false;
closeButton.visible = false;
lockButton.visible = false;
colorizingButton.visible = false;
label.text = ruler.tooltip;
tooltip.visible = true;
tooltip.visible = true; */
}
}
}

@ -609,8 +609,8 @@ Item {
id: appletMouseArea
anchors.fill: parent
enabled: applet && !latteApplet && canBeHovered && !root.editMode && !lockZoom && communicator.parabolicEffectEnabled
hoverEnabled: !root.editMode && (!latteApplet) ? true : false
enabled: applet && !latteApplet && canBeHovered && !lockZoom && communicator.parabolicEffectEnabled
hoverEnabled: latteApplet ? false : true
propagateComposedEvents: true
//! a way must be found in order for this be enabled
@ -618,7 +618,7 @@ Item {
//! also on this is based the tooltips behavior by enabling it
//! plasma tooltips are disabled
visible: applet && !appletItem.latteApplet && !lockZoom && communicator.parabolicEffectEnabled
&& canBeHovered && !(appletItem.isSeparator && !root.editMode)
&& canBeHovered && !appletItem.isSeparator
property bool blockWheel: false
property bool pressed: false

@ -621,7 +621,7 @@ Item{
}
function calculateScales( currentMousePosition ){
if (root.editMode || root.zoomFactor===1 || root.durationTime===0) {
if (root.zoomFactor===1 || root.durationTime===0) {
return;
}

@ -78,7 +78,7 @@ MouseArea{
acceptedButtons: Qt.LeftButton | Qt.MidButton | Qt.RightButton
hoverEnabled: visible && (!inAnimation) && (!IsStartup) && (!root.taskInAnimation)
&& (!root.editMode || root.debugLocation)&&(!inBouncingAnimation) && !isSeparator
&&(!inBouncingAnimation) && !isSeparator
// hoverEnabled: false
//opacity : isSeparator && (hiddenSpacerLeft.neighbourSeparator || hiddenSpacerRight.neighbourSeparator) ? 0 : 1
@ -545,9 +545,6 @@ MouseArea{
///////////////// Mouse Area Events ///////////////////
onEntered: {
if (root.editMode)
return;
root.stopCheckRestoreZoomTimer();
if (restoreAnimation.running) {
@ -620,7 +617,7 @@ MouseArea{
//! onPositionChanged signal may be delayed. we can fix this by don't delay at all
//! when mouseX-Y is updated based on the plasmoid formFactor
function mousePosChanged(mousePos) {
if (root.editMode || mousePos<0 ||
if (mousePos<0 ||
(inBlockingAnimation && !(inAttentionAnimation||inFastRestoreAnimation||inMimicParabolicAnimation)))
return;
@ -672,7 +669,7 @@ MouseArea{
onPositionChanged: {
if (root.editMode || (inBlockingAnimation && !(inAttentionAnimation||inFastRestoreAnimation||inMimicParabolicAnimation)))
if ((inBlockingAnimation && !(inAttentionAnimation||inFastRestoreAnimation||inMimicParabolicAnimation)))
return;
if (root.latteView && root.latteView.isHalfShown) {
@ -683,7 +680,6 @@ MouseArea{
// mouse.button is always 0 here, hence checking with mouse.buttons
if (pressX != -1 && mouse.buttons == Qt.LeftButton
&& isDragged
&& !root.editMode
&& dragHelper.isDrag(pressX, pressY, mouse.x, mouse.y) ) {
root.dragSource = taskItem;
dragHelper.startDrag(taskItem, model.MimeType, model.MimeData,

@ -142,7 +142,7 @@ Item{
}
function calculateScales( currentMousePosition ){
if (root.editMode || root.zoomFactor===1 || root.durationTime===0) {
if (root.zoomFactor===1 || root.durationTime===0) {
return;
}

Loading…
Cancel
Save