summaryrefslogtreecommitdiff
path: root/DevTools
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-05-24 16:32:20 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-05-24 16:32:20 +0200
commit21c56477b046a7e22c8cd7c675b9459ee794df43 (patch)
treeb84b41dd6286480b35a559f5ec189629d3655430 /DevTools
parentabbcdba72e63f223c4207242f6d776abb6fdaa8b (diff)
downloadserenity-21c56477b046a7e22c8cd7c675b9459ee794df43.zip
LibGUI: Add a GAbstractButton base class for button widgets.
This patch moves GButton and GRadioButton to inherit from it. This allows them to share code for mouse event handling, etc.
Diffstat (limited to 'DevTools')
-rw-r--r--DevTools/VisualBuilder/VBWidget.cpp2
-rw-r--r--DevTools/VisualBuilder/VBWidgetRegistry.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/DevTools/VisualBuilder/VBWidget.cpp b/DevTools/VisualBuilder/VBWidget.cpp
index 385b918052..a90b7fb1ea 100644
--- a/DevTools/VisualBuilder/VBWidget.cpp
+++ b/DevTools/VisualBuilder/VBWidget.cpp
@@ -123,7 +123,7 @@ void VBWidget::setup_properties()
}
if (m_type == VBWidgetType::GButton) {
- VB_ADD_PROPERTY(GButton, "caption", caption, set_caption, string);
+ VB_ADD_PROPERTY(GButton, "text", text, set_text, string);
}
if (m_type == VBWidgetType::GGroupBox) {
diff --git a/DevTools/VisualBuilder/VBWidgetRegistry.cpp b/DevTools/VisualBuilder/VBWidgetRegistry.cpp
index 3bde68ec3d..b6e3cfa561 100644
--- a/DevTools/VisualBuilder/VBWidgetRegistry.cpp
+++ b/DevTools/VisualBuilder/VBWidgetRegistry.cpp
@@ -44,7 +44,7 @@ static GWidget* build_gwidget(VBWidgetType type, GWidget* parent)
}
case VBWidgetType::GButton: {
auto* button = new GButton(parent);
- button->set_caption("button_1");
+ button->set_text("button_1");
return button;
}
case VBWidgetType::GSpinBox: {