diff --git a/include/eepp/ui/uimessagebox.hpp b/include/eepp/ui/uimessagebox.hpp index 1fbde0c3f..633609293 100644 --- a/include/eepp/ui/uimessagebox.hpp +++ b/include/eepp/ui/uimessagebox.hpp @@ -32,7 +32,7 @@ class EE_API UIMessageBox : public UIWindow { void setCloseWithKey(const Uint32 & closeWithKey); protected: UI_MSGBOX_TYPE mMsgBoxType; - UITextView * mTextBox; + UITextView * mTextBox; UIPushButton * mButtonOK; UIPushButton * mButtonCancel; Uint32 mCloseWithKey; diff --git a/src/eepp/ui/uicommondialog.cpp b/src/eepp/ui/uicommondialog.cpp index 9f59d81da..f45542e7c 100644 --- a/src/eepp/ui/uicommondialog.cpp +++ b/src/eepp/ui/uicommondialog.cpp @@ -110,6 +110,14 @@ bool UICommonDialog::isType( const Uint32& type ) const { void UICommonDialog::setTheme( UITheme * Theme ) { UIWindow::setTheme( Theme ); + mButtonOpen->setTheme( Theme ); + mButtonCancel->setTheme( Theme ); + mButtonUp->setTheme( Theme ); + mList->setTheme( Theme ); + mPath->setTheme( Theme ); + mFile->setTheme( Theme ); + mFiletype->setTheme( Theme ); + Drawable * Icon = Theme->getIconByName( "go-up" ); if ( NULL != Icon ) { diff --git a/src/eepp/ui/uilistbox.cpp b/src/eepp/ui/uilistbox.cpp index c2ed82f7b..7881e248c 100644 --- a/src/eepp/ui/uilistbox.cpp +++ b/src/eepp/ui/uilistbox.cpp @@ -86,6 +86,9 @@ bool UIListBox::isType( const Uint32& type ) const { void UIListBox::setTheme( UITheme * Theme ) { UIWidget::setTheme( Theme ); + mVScrollBar->setTheme( Theme ); + mHScrollBar->setTheme( Theme ); + setThemeSkin( Theme, "listbox" ); autoPadding(); @@ -167,6 +170,7 @@ Uint32 UIListBox::addListBoxItem( const String& text ) { UIListBoxItem * UIListBox::createListBoxItem( const String& Name ) { UIListBoxItem * tItem = UIListBoxItem::New(); tItem->setParent( mContainer ); + tItem->setTheme( mTheme ); tItem->setHorizontalAlign( UI_HALIGN_LEFT )->setVerticalAlign( UI_VALIGN_CENTER ); tItem->setFontStyleConfig( mFontStyleConfig ); tItem->setText( Name ); diff --git a/src/eepp/ui/uimessagebox.cpp b/src/eepp/ui/uimessagebox.cpp index 4c1f1e755..230ca5f96 100644 --- a/src/eepp/ui/uimessagebox.cpp +++ b/src/eepp/ui/uimessagebox.cpp @@ -80,6 +80,10 @@ UIMessageBox::~UIMessageBox() { void UIMessageBox::setTheme( UITheme * Theme ) { UIWindow::setTheme( Theme ); + mTextBox->setTheme( Theme ); + mButtonOK->setTheme( Theme ); + mButtonCancel->setTheme( Theme ); + if ( "Retry" != mButtonOK->getText() ) { Drawable * OKIcon = Theme->getIconByName( "ok" ); Drawable * CancelIcon = Theme->getIconByName( "cancel" ); diff --git a/src/tools/uieditor/uieditor.cpp b/src/tools/uieditor/uieditor.cpp index 3c0b509c3..c8eca1879 100644 --- a/src/tools/uieditor/uieditor.cpp +++ b/src/tools/uieditor/uieditor.cpp @@ -266,6 +266,7 @@ bool onCloseRequestCallback( EE::Window::Window * w ) { UIThemeManager::instance()->setDefaultTheme( theme ); MsgBox = UIMessageBox::New( MSGBOX_OKCANCEL, "Do you really want to close the current file?\nAll changes will be lost." ); + MsgBox->setTheme( theme ); MsgBox->addEventListener( Event::MsgBoxConfirmClick, cb::Make1( []( const Event * event ) { window->close(); } ) ); MsgBox->addEventListener( Event::OnClose, cb::Make1( []( const Event * event ) { MsgBox = NULL; } ) ); MsgBox->setTitle( "Close Editor?" ); @@ -359,6 +360,7 @@ void fileMenuClick( const Event * Event ) { if ( "Open project..." == txt ) { UICommonDialog * TGDialog = UICommonDialog::New( UI_CDL_DEFAULT_FLAGS, "*.xml" ); + TGDialog->setTheme( theme ); TGDialog->setWinFlags( UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_MODAL ); TGDialog->setTitle( "Open layout..." ); TGDialog->addEventListener( Event::OpenFile, cb::Make1( projectOpen ) ); @@ -366,6 +368,7 @@ void fileMenuClick( const Event * Event ) { TGDialog->show(); } else if ( "Open layout..." == txt ) { UICommonDialog * TGDialog = UICommonDialog::New( UI_CDL_DEFAULT_FLAGS, "*.xml" ); + TGDialog->setTheme( theme ); TGDialog->setWinFlags( UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_MODAL ); TGDialog->setTitle( "Open layout..." ); TGDialog->addEventListener( Event::OpenFile, cb::Make1( layoutOpen ) ); @@ -378,6 +381,7 @@ void fileMenuClick( const Event * Event ) { onCloseRequestCallback( window ); } else if ( "Load images from path..." == txt ) { UICommonDialog * TGDialog = UICommonDialog::New( UI_CDL_DEFAULT_FLAGS | CDL_FLAG_ALLOW_FOLDER_SELECT ); + TGDialog->setTheme( theme ); TGDialog->setWinFlags( UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_MODAL ); TGDialog->setTitle( "Open images from folder..." ); TGDialog->addEventListener( Event::OpenFile, cb::Make1( imagePathOpen ) ); @@ -385,6 +389,7 @@ void fileMenuClick( const Event * Event ) { TGDialog->show(); } else if ( "Load fonts from path..." == txt ) { UICommonDialog * TGDialog = UICommonDialog::New( UI_CDL_DEFAULT_FLAGS | CDL_FLAG_ALLOW_FOLDER_SELECT ); + TGDialog->setTheme( theme ); TGDialog->setWinFlags( UI_WIN_DEFAULT_FLAGS | UI_WIN_MAXIMIZE_BUTTON | UI_WIN_MODAL ); TGDialog->setTitle( "Open fonts from folder..." ); TGDialog->addEventListener( Event::OpenFile, cb::Make1( fontPathOpen ) );