mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:28:12 +00:00
LibGUI: Add TabWidget::set_property() and handle some properties
This commit is contained in:
parent
cd0ddf27f3
commit
3355a3e179
2 changed files with 18 additions and 0 deletions
|
@ -24,6 +24,7 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/JsonValue.h>
|
||||
#include <LibGUI/BoxLayout.h>
|
||||
#include <LibGUI/Painter.h>
|
||||
#include <LibGUI/TabWidget.h>
|
||||
|
@ -394,4 +395,19 @@ void TabWidget::context_menu_event(ContextMenuEvent& context_menu_event)
|
|||
}
|
||||
}
|
||||
|
||||
bool TabWidget::set_property(const StringView& name, const JsonValue& value)
|
||||
{
|
||||
if (name == "container_padding") {
|
||||
set_container_padding(value.to_i32());
|
||||
return true;
|
||||
}
|
||||
|
||||
if (name == "uniform_tabs") {
|
||||
set_uniform_tabs(value.to_bool());
|
||||
return true;
|
||||
}
|
||||
|
||||
return Widget::set_property(name, value);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue