mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-01 18:50:16 +03:00
Fix stack-overflow when auto-sizing dropdowns.
Fix combobox button click not closing the popup listbox when clicking the button with a visible popup listbox. Fix some incorrect size policies in UIFileDialog.
This commit is contained in:
@@ -21,7 +21,7 @@ class EE_API UIComboBox : public UIWidget {
|
||||
|
||||
UIDropDownList* getDropDownList() const { return mDropDownList; }
|
||||
|
||||
UINode* getButton() const { return mButton; }
|
||||
UIWidget* getButton() const { return mButton; }
|
||||
|
||||
const String& getText();
|
||||
|
||||
@@ -38,7 +38,7 @@ class EE_API UIComboBox : public UIWidget {
|
||||
|
||||
protected:
|
||||
UIDropDownList* mDropDownList;
|
||||
UINode* mButton;
|
||||
UIWidget* mButton;
|
||||
|
||||
UIComboBox();
|
||||
|
||||
|
||||
@@ -51,15 +51,24 @@ class EE_API UIDropDown : public UITextInput {
|
||||
const Uint32& propertyIndex = 0 ) const;
|
||||
virtual std::vector<PropertyId> getPropertiesImplemented() const;
|
||||
|
||||
void addRelatedWidget( UIWidget* widget ) { mRelatedWidgets.push_back( widget ); }
|
||||
|
||||
void removeRelatedWidget( UIWidget* widget ) {
|
||||
mRelatedWidgets.erase(
|
||||
std::find( mRelatedWidgets.begin(), mRelatedWidgets.end(), widget ) );
|
||||
}
|
||||
|
||||
protected:
|
||||
StyleConfig mStyleConfig;
|
||||
UINode* mFriendNode{ nullptr };
|
||||
Uint64 mLastFocusLoss{ 0 };
|
||||
std::vector<UIWidget*> mRelatedWidgets;
|
||||
|
||||
UIDropDown( const std::string& tag );
|
||||
|
||||
virtual UIWidget* getPopUpWidget() const;
|
||||
|
||||
void onPopUpFocusLoss( const Event* Event );
|
||||
virtual void onPopUpFocusLoss();
|
||||
|
||||
virtual void onItemSelected( const Event* Event );
|
||||
virtual void show();
|
||||
|
||||
@@ -47,6 +47,7 @@ enum UIFlag : Int64 {
|
||||
UI_HTML_ELEMENT = ( 1ULL << 31 ),
|
||||
UI_CREATING_NODE = ( 1ULL << 32 ),
|
||||
UI_IGNORE_GLOBAL_CSS = ( 1ULL << 33 ),
|
||||
UI_AUTO_SIZING = ( 1ULL << 34 ),
|
||||
};
|
||||
|
||||
enum UINodeType {
|
||||
|
||||
Reference in New Issue
Block a user