mirror of
https://gitlab.com/sheaf/metabrush.git
synced 2024-11-23 15:34:06 +00:00
make stroke popover menu appear on right click
This commit is contained in:
parent
bcd0b9fb13
commit
3a7b05d60d
|
@ -360,7 +360,7 @@ To specify it in CSS, set the box-shadow of the contents node."
|
|||
background-color: @bg;
|
||||
}
|
||||
|
||||
.metabrush .strokeMenu contents {
|
||||
.metabrush .strokeMenu contents, .metabrush .strokeMenu arrow {
|
||||
border: unset;
|
||||
border-radius: 0px;
|
||||
margin: 0px;
|
||||
|
@ -594,7 +594,7 @@ To specify it in CSS, set the box-shadow of the contents node."
|
|||
}
|
||||
|
||||
/* Style when dragging layer item over the top part of an item */
|
||||
.metabrush .dragging-item .drag-top.layer-item {
|
||||
.dragging-item .drag-top.layer-item {
|
||||
border-top: 2px solid @highlight;
|
||||
margin-top: -2px;
|
||||
box-shadow:
|
||||
|
@ -602,7 +602,7 @@ To specify it in CSS, set the box-shadow of the contents node."
|
|||
}
|
||||
|
||||
/* Style when dragging layer item over the bottom part of an item */
|
||||
.metabrush .dragging-item .drag-bot.layer-item {
|
||||
.dragging-item .drag-bot.layer-item {
|
||||
border-bottom: 2px solid @highlight;
|
||||
margin-bottom: -2px;
|
||||
box-shadow:
|
||||
|
@ -610,7 +610,7 @@ To specify it in CSS, set the box-shadow of the contents node."
|
|||
}
|
||||
|
||||
/* Style when dragging brush over an item */
|
||||
.metabrush .dragging-brush .drag-top.layer-item, .dragging-brush .drag-bot.layer-item {
|
||||
.dragging-brush .drag-top.layer-item, .dragging-brush .drag-bot.layer-item {
|
||||
border-top: 2px solid @brushStroke;
|
||||
border-bottom: 2px solid @brushStroke;
|
||||
border-left: 0px;
|
||||
|
|
|
@ -178,8 +178,8 @@ strokeMenuDescription lay =
|
|||
GroupLayer {} -> MenuItemDescription "Delete group" ( Nothing, DeleteLayer lay) Nothing
|
||||
, Section ( Just "New group" ) $
|
||||
[ MenuItemDescription "...above" ( Nothing, NewGroup GroupAbove lay ) Nothing
|
||||
, MenuItemDescription "...below" ( Nothing, NewGroup GroupBelow lay ) Nothing
|
||||
, MenuItemDescription "...containing" ( Nothing, NewGroup GroupContaining lay ) Nothing
|
||||
, MenuItemDescription "...below" ( Nothing, NewGroup GroupBelow lay ) Nothing
|
||||
]
|
||||
]
|
||||
|
||||
|
|
|
@ -459,10 +459,16 @@ newLayerView uiElts@( UIElements { window } ) vars = mdo
|
|||
------------------
|
||||
|
||||
click <- GTK.gestureClickNew
|
||||
GTK.gestureSingleSetButton click 0 -- listen to both left and right clicks
|
||||
|
||||
void $ GTK.onGestureClickPressed click $ \ clickNo x y -> do
|
||||
case clickNo of
|
||||
_ -> do
|
||||
void $ GTK.onGestureClickPressed click $ \ _nbClicks x y -> do
|
||||
button <- GTK.gestureSingleGetCurrentButton ?self
|
||||
if -- | button <= 1 && nbClicks > 1
|
||||
-- -> do GTK.editableSetEditable label True
|
||||
-- GTK.editableLabelStartEditing label
|
||||
-- void $ GTK.widgetGrabFocus label
|
||||
| button == 3
|
||||
-> do
|
||||
GTK.widgetUnparent layerPopover
|
||||
GTK.widgetSetParent layerPopover expander
|
||||
layer <- getLayerData listItem
|
||||
|
@ -474,8 +480,8 @@ newLayerView uiElts@( UIElements { window } ) vars = mdo
|
|||
GDK.setRectangleY rect ( round y )
|
||||
GTK.popoverSetPointingTo layerPopover ( Just rect )
|
||||
GTK.popoverPopup layerPopover
|
||||
|
||||
_ -> return ()
|
||||
| otherwise
|
||||
-> return ()
|
||||
|
||||
----------------------------
|
||||
-- Visibility CheckButton --
|
||||
|
|
Loading…
Reference in a new issue