diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 2d9c2129da..413c404c34 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -789,7 +789,10 @@ void MainScreen::CreateViews() { #endif logos->Add(new ImageView(I_LOGO, IS_DEFAULT, new LinearLayoutParams(Margins(-12, 0, 0, 0)))); rightColumnItems->Add(logos); - rightColumnItems->Add(new TextView(versionString, new LinearLayoutParams(Margins(70, -6, 0, 0))))->SetSmall(true); + TextView *ver = rightColumnItems->Add(new TextView(versionString, new LinearLayoutParams(Margins(70, -6, 0, 0)))); + ver->SetSmall(true); + ver->SetClip(false); + #if defined(_WIN32) || defined(USING_QT_UI) rightColumnItems->Add(new Choice(mm->T("Load","Load...")))->OnClick.Handle(this, &MainScreen::OnLoadFile); #endif diff --git a/ext/native/ui/view.cpp b/ext/native/ui/view.cpp index cbdb5b328d..fa39ffc7bd 100644 --- a/ext/native/ui/view.cpp +++ b/ext/native/ui/view.cpp @@ -617,7 +617,7 @@ void TextView::Draw(UIContext &dc) { bool clip = false; if (w > bounds_.w || h > bounds_.h) clip = true; - if (bounds_.w < 0 || bounds_.h < 0) { + if (bounds_.w < 0 || bounds_.h < 0 || !clip_) { // We have a layout but, but try not to screw up rendering. // TODO: Fix properly. clip = false; diff --git a/ext/native/ui/view.h b/ext/native/ui/view.h index b19eb091aa..da0f7173bc 100644 --- a/ext/native/ui/view.h +++ b/ext/native/ui/view.h @@ -673,8 +673,8 @@ private: class TextView : public InertView { public: - TextView(const std::string &text, LayoutParams *layoutParams = 0) - : InertView(layoutParams), text_(text), textAlign_(0), textColor_(0xFFFFFFFF), small_(false), shadow_(false), focusable_(false) {} + TextView(const std::string &text, LayoutParams *layoutParams = 0) + : InertView(layoutParams), text_(text), textAlign_(0), textColor_(0xFFFFFFFF), small_(false), shadow_(false), focusable_(false), clip_(true) {} TextView(const std::string &text, int textAlign, bool small, LayoutParams *layoutParams = 0) : InertView(layoutParams), text_(text), textAlign_(textAlign), textColor_(0xFFFFFFFF), small_(small), shadow_(false), focusable_(false) {} @@ -688,6 +688,7 @@ public: void SetTextColor(uint32_t color) { textColor_ = color; } void SetShadow(bool shadow) { shadow_ = shadow; } void SetFocusable(bool focusable) { focusable_ = focusable; } + void SetClip(bool clip) { clip_ = clip; } bool CanBeFocused() const override { return focusable_; } @@ -698,6 +699,7 @@ private: bool small_; bool shadow_; bool focusable_; + bool clip_; }; class TextEdit : public View {