diff --git a/haxe/ui/_module/styles/default/pickers.css b/haxe/ui/_module/styles/default/pickers.css index 798204ac3..ee511d89b 100644 --- a/haxe/ui/_module/styles/default/pickers.css +++ b/haxe/ui/_module/styles/default/pickers.css @@ -44,7 +44,15 @@ vertical-align: center; } -.item-picker.no-trigger-icon .item-picker-trigger-icon { +.item-picker.no-icon .image { + hidden: true; +} + +.item-picker.no-text .label { + hidden: true; +} + +.item-picker.no-trigger-icon .item-picker-trigger-icon, .item-picker.no-trigger-icon .item-picker-trigger-icon-container { hidden: true; } @@ -72,6 +80,14 @@ filter: box-shadow(2, -2, #000000, 0.15, 6); } +.item-picker-container.rounded.position-up { + border-bottom-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + padding: 4px; + background-color: $secondary-background-color; +} + /************************************************************************ ** MONTH PICKER *************************************************************************/ diff --git a/haxe/ui/components/pickers/ItemPicker.hx b/haxe/ui/components/pickers/ItemPicker.hx index 19869e979..7a375f1f7 100644 --- a/haxe/ui/components/pickers/ItemPicker.hx +++ b/haxe/ui/components/pickers/ItemPicker.hx @@ -54,6 +54,16 @@ class ItemPicker extends InteractiveComponent implements IDataComponent implemen builder.panelSelectionEvent = _panelSelectionEvent; return value; } + + public function showPanel() { + var builder:ItemPickerBuilder = cast(_compositeBuilder, ItemPickerBuilder); + builder.showPanel(); + } + + public function hidePanel() { + var builder:ItemPickerBuilder = cast(_compositeBuilder, ItemPickerBuilder); + builder.hidePanel(); + } } class ItemPickerHandler { @@ -326,6 +336,7 @@ class ItemPickerBuilder extends CompositeBuilder { marginBottom = panelContainer.style.marginBottom; marginRight = panelContainer.style.marginRight; horizontalPadding = panelContainer.style.paddingLeft + panelContainer.style.paddingRight; + verticalPadding = panelContainer.style.paddingTop + panelContainer.style.paddingBottom; borderSize = panelContainer.style.borderTopSize; } @@ -362,7 +373,7 @@ class ItemPickerBuilder extends CompositeBuilder { _panelFiller.top = 0; } else if (panelPosition == "up") { panelContainer.top = picker.screenTop - panelContainer.height - marginTop; - _panelFiller.top = panelHeight + borderSize; + _panelFiller.top = panelHeight + (verticalPadding - borderSize); } } diff --git a/haxe/ui/components/pickers/MenuItemPicker.hx b/haxe/ui/components/pickers/MenuItemPicker.hx index a76e22b6f..02fc0c387 100644 --- a/haxe/ui/components/pickers/MenuItemPicker.hx +++ b/haxe/ui/components/pickers/MenuItemPicker.hx @@ -16,7 +16,7 @@ import haxe.ui.util.Variant; diff --git a/haxe/ui/core/Component.hx b/haxe/ui/core/Component.hx index cd77296e8..61406571e 100644 --- a/haxe/ui/core/Component.hx +++ b/haxe/ui/core/Component.hx @@ -2170,20 +2170,21 @@ class Component extends ComponentImpl } } + private var recursivePointerEvents:Bool = true; private function onPointerEventsMouseOver(e:MouseEvent) { - addClass(":hover", true, true); + addClass(":hover", true, recursivePointerEvents); } private function onPointerEventsMouseOut(e:MouseEvent) { - removeClass(":hover", true, true); + removeClass(":hover", true, recursivePointerEvents); } private function onPointerEventsMouseDown(e:MouseEvent) { - addClass(":down", true, true); + addClass(":down", true, recursivePointerEvents); } private function onPointerEventsMouseUp(e:MouseEvent) { - removeClass(":down", true, true); + removeClass(":down", true, recursivePointerEvents); } //***********************************************************************************************************