summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/button.cpp2
-rw-r--r--src/gui/widgets/button.h2
-rw-r--r--src/gui/widgets/tabs/tab.cpp2
-rw-r--r--src/gui/widgets/widget.cpp4
4 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/widgets/button.cpp b/src/gui/widgets/button.cpp
index 1a8c613ba..446f4756f 100644
--- a/src/gui/widgets/button.cpp
+++ b/src/gui/widgets/button.cpp
@@ -643,7 +643,7 @@ void Button::draw(Graphics *graphics)
if (image)
graphics->drawImage(image, textX, textY);
- //font->drawString(graphics, mCaption, textX, textY);
+// font->drawString(graphics, mCaption, textX, textY);
BLOCK_END("Button::draw")
}
diff --git a/src/gui/widgets/button.h b/src/gui/widgets/button.h
index c97741548..153195454 100644
--- a/src/gui/widgets/button.h
+++ b/src/gui/widgets/button.h
@@ -206,7 +206,7 @@ class Button final : public Widget,
* @see getCaption, adjustSize
*/
void setCaption(const std::string& caption)
- { mCaption = caption; mTextChanged = true;}
+ { mCaption = caption; mTextChanged = true; }
/**
* Gets the caption of the button.
diff --git a/src/gui/widgets/tabs/tab.cpp b/src/gui/widgets/tabs/tab.cpp
index e361c78ff..21b51d79a 100644
--- a/src/gui/widgets/tabs/tab.cpp
+++ b/src/gui/widgets/tabs/tab.cpp
@@ -252,7 +252,7 @@ void Tab::draw(Graphics *graphics)
mLabel->setForegroundColorAll(*mPlayerFlashColor,
*mPlayerFlashOutlineColor);
break;
- case 3: //mTabbedArea->isTabSelected(this)
+ case 3: // mTabbedArea->isTabSelected(this)
mLabel->setForegroundColorAll(*mTabSelectedColor,
*mTabSelectedOutlineColor);
break;
diff --git a/src/gui/widgets/widget.cpp b/src/gui/widgets/widget.cpp
index 70aac5aa2..cbf301b27 100644
--- a/src/gui/widgets/widget.cpp
+++ b/src/gui/widgets/widget.cpp
@@ -187,7 +187,7 @@ bool Widget::isFocused() const
void Widget::setFocusable(const bool focusable)
{
- if (!focusable && isFocused())
+ if (!focusable && isFocused() && mFocusHandler)
mFocusHandler->focusNone();
mFocusable = focusable;
}
@@ -220,7 +220,7 @@ void Widget::requestMoveToBottom()
void Widget::setVisible(bool visible)
{
- if (!visible && isFocused())
+ if (!visible && isFocused() && mFocusHandler)
mFocusHandler->focusNone();
if (visible)