diff --git a/assets/theme.css b/assets/theme.css index e12754f..1be8db0 100644 --- a/assets/theme.css +++ b/assets/theme.css @@ -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; diff --git a/src/app/MetaBrush/UI/Menu.hs b/src/app/MetaBrush/UI/Menu.hs index 2074b45..7a7812c 100644 --- a/src/app/MetaBrush/UI/Menu.hs +++ b/src/app/MetaBrush/UI/Menu.hs @@ -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 ] ] diff --git a/src/app/MetaBrush/UI/StrokeTreeView.hs b/src/app/MetaBrush/UI/StrokeTreeView.hs index 268b426..18123e9 100644 --- a/src/app/MetaBrush/UI/StrokeTreeView.hs +++ b/src/app/MetaBrush/UI/StrokeTreeView.hs @@ -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 --