From c06eaa8d78db780780f4dab2d5d2df311a695dbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Mon, 4 Jul 2022 01:15:12 -0300 Subject: [PATCH] Build fixes. --- include/eepp/ui/uispinbox.hpp | 2 +- include/eepp/ui/uitextinputpassword.hpp | 2 +- src/eepp/ui/uispinbox.cpp | 2 +- src/eepp/ui/uitextinputpassword.cpp | 26 +++++++++++-------------- src/tools/eterm/eterm.cpp | 1 - 5 files changed, 14 insertions(+), 19 deletions(-) diff --git a/include/eepp/ui/uispinbox.hpp b/include/eepp/ui/uispinbox.hpp index 36c64d47b..79dd89aee 100644 --- a/include/eepp/ui/uispinbox.hpp +++ b/include/eepp/ui/uispinbox.hpp @@ -57,7 +57,7 @@ class EE_API UISpinBox : public UIWidget { virtual bool applyProperty( const StyleSheetProperty& attribute ); virtual std::string getPropertyString( const PropertyDefinition* propertyDef, - const Uint32& propertyIndex = 0 ); + const Uint32& propertyIndex = 0 ) const; protected: UITextInput* mInput; diff --git a/include/eepp/ui/uitextinputpassword.hpp b/include/eepp/ui/uitextinputpassword.hpp index 20c6dbb7e..129b5be66 100644 --- a/include/eepp/ui/uitextinputpassword.hpp +++ b/include/eepp/ui/uitextinputpassword.hpp @@ -15,7 +15,7 @@ class EE_API UITextInputPassword : public UITextInput { virtual void draw(); - virtual const String& getText(); + virtual const String& getText() const; virtual UITextView* setText( const String& text ); diff --git a/src/eepp/ui/uispinbox.cpp b/src/eepp/ui/uispinbox.cpp index 4222084e3..dc22013dc 100644 --- a/src/eepp/ui/uispinbox.cpp +++ b/src/eepp/ui/uispinbox.cpp @@ -283,7 +283,7 @@ void UISpinBox::onPaddingChange() { } std::string UISpinBox::getPropertyString( const PropertyDefinition* propertyDef, - const Uint32& propertyIndex ) { + const Uint32& propertyIndex ) const { if ( NULL == propertyDef ) return ""; diff --git a/src/eepp/ui/uitextinputpassword.cpp b/src/eepp/ui/uitextinputpassword.cpp index 88b65d06b..dcc3d9483 100644 --- a/src/eepp/ui/uitextinputpassword.cpp +++ b/src/eepp/ui/uitextinputpassword.cpp @@ -14,8 +14,6 @@ UITextInputPassword::UITextInputPassword() : mPassCache = Text::New(); updateFontStyleConfig(); - - alignFix(); } UITextInputPassword::~UITextInputPassword() { @@ -67,8 +65,8 @@ void UITextInputPassword::draw() { void UITextInputPassword::alignFix() { switch ( Font::getHorizontalAlign( getFlags() ) ) { case UI_HALIGN_CENTER: - mRealAlignOffset.x = ( Float )( ( Int32 )( mSize.x - mPassCache->getTextWidth() ) / 2 ); - mHintAlignOffset.x = ( Float )( ( Int32 )( mSize.x - mHintCache->getTextWidth() ) / 2 ); + mRealAlignOffset.x = (Float)( (Int32)( mSize.x - mPassCache->getTextWidth() ) / 2 ); + mHintAlignOffset.x = (Float)( (Int32)( mSize.x - mHintCache->getTextWidth() ) / 2 ); break; case UI_HALIGN_RIGHT: mRealAlignOffset.x = ( (Float)mSize.x - (Float)mPassCache->getTextWidth() ); @@ -82,16 +80,14 @@ void UITextInputPassword::alignFix() { switch ( Font::getVerticalAlign( getFlags() ) ) { case UI_VALIGN_CENTER: - mRealAlignOffset.y = - ( Float )( ( ( Int32 )( mSize.y - mPaddingPx.Top - mPaddingPx.Bottom - - mPassCache->getTextHeight() ) ) / - 2.f ) - - 1; - mHintAlignOffset.y = - ( Float )( ( ( Int32 )( mSize.y - mPaddingPx.Top - mPaddingPx.Bottom - - mHintCache->getTextHeight() ) ) / - 2.f ) - - 1; + mRealAlignOffset.y = (Float)( ( (Int32)( mSize.y - mPaddingPx.Top - mPaddingPx.Bottom - + mPassCache->getTextHeight() ) ) / + 2.f ) - + 1; + mHintAlignOffset.y = (Float)( ( (Int32)( mSize.y - mPaddingPx.Top - mPaddingPx.Bottom - + mHintCache->getTextHeight() ) ) / + 2.f ) - + 1; break; case UI_VALIGN_BOTTOM: mRealAlignOffset.y = ( (Float)mSize.y - (Float)mPassCache->getTextHeight() ); @@ -172,7 +168,7 @@ void UITextInputPassword::onFontChanged() { UITextInput::onFontChanged(); } -const String& UITextInputPassword::getText() { +const String& UITextInputPassword::getText() const { return UITextView::getText(); } diff --git a/src/tools/eterm/eterm.cpp b/src/tools/eterm/eterm.cpp index c8522315f..4c1d4604f 100644 --- a/src/tools/eterm/eterm.cpp +++ b/src/tools/eterm/eterm.cpp @@ -101,7 +101,6 @@ EE_MAIN_FUNC int main( int, char*[] ) { if ( String::contains( resPath, "ecode.app" ) ) { resPath = FileSystem::getCurrentWorkingDirectory(); FileSystem::dirAddSlashAtEnd( resPath ); - mIsBundledApp = true; } #elif EE_PLATFORM == EE_PLATFORM_LINUX if ( String::contains( resPath, ".mount_" ) ) {