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 inline Qt::WindowFlags PrimaryConfigView::wFlags() const
{ {
return (flags() | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint) & ~Qt::WindowDoesNotAcceptFocus; return (flags() | Qt::FramelessWindowHint) & ~Qt::WindowDoesNotAcceptFocus;
} }
QWindow *PrimaryConfigView::secondaryWindow() QWindow *PrimaryConfigView::secondaryWindow()

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

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

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

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

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

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

Loading…
Cancel
Save