mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:38:12 +00:00
VisualBuilder: Add some more GWidget default properties.
This commit is contained in:
parent
8f4c59c276
commit
6f90f41516
5 changed files with 14 additions and 5 deletions
|
@ -7,7 +7,7 @@
|
||||||
VBPropertiesWindow::VBPropertiesWindow()
|
VBPropertiesWindow::VBPropertiesWindow()
|
||||||
{
|
{
|
||||||
set_title("Properties");
|
set_title("Properties");
|
||||||
set_rect(780, 200, 200, 280);
|
set_rect(780, 200, 220, 280);
|
||||||
|
|
||||||
auto* widget = new GWidget;
|
auto* widget = new GWidget;
|
||||||
widget->set_fill_with_background_color(true);
|
widget->set_fill_with_background_color(true);
|
||||||
|
|
|
@ -84,7 +84,11 @@ void VBWidget::synchronize_properties()
|
||||||
property_by_name("height")->set_value(m_gwidget->height());
|
property_by_name("height")->set_value(m_gwidget->height());
|
||||||
property_by_name("x")->set_value(m_gwidget->x());
|
property_by_name("x")->set_value(m_gwidget->x());
|
||||||
property_by_name("y")->set_value(m_gwidget->y());
|
property_by_name("y")->set_value(m_gwidget->y());
|
||||||
|
property_by_name("visible")->set_value(m_gwidget->is_visible());
|
||||||
|
property_by_name("enabled")->set_value(m_gwidget->is_enabled());
|
||||||
|
property_by_name("tooltip")->set_value(m_gwidget->tooltip());
|
||||||
|
property_by_name("background_color")->set_value(m_gwidget->background_color());
|
||||||
|
property_by_name("foreground_color")->set_value(m_gwidget->foreground_color());
|
||||||
m_property_model->update();
|
m_property_model->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ String VBWidgetPropertyModel::column_name(int column) const
|
||||||
GModel::ColumnMetadata VBWidgetPropertyModel::column_metadata(int column) const
|
GModel::ColumnMetadata VBWidgetPropertyModel::column_metadata(int column) const
|
||||||
{
|
{
|
||||||
UNUSED_PARAM(column);
|
UNUSED_PARAM(column);
|
||||||
return { 80, TextAlignment::CenterLeft };
|
return { 90, TextAlignment::CenterLeft };
|
||||||
}
|
}
|
||||||
|
|
||||||
GVariant VBWidgetPropertyModel::data(const GModelIndex& index, Role role) const
|
GVariant VBWidgetPropertyModel::data(const GModelIndex& index, Role role) const
|
||||||
|
|
|
@ -86,5 +86,10 @@ GWidget* VBWidgetRegistry::build_gwidget(VBWidgetType type, GWidget* parent, Vec
|
||||||
add_property("height");
|
add_property("height");
|
||||||
add_property("x");
|
add_property("x");
|
||||||
add_property("y");
|
add_property("y");
|
||||||
|
add_property("visible");
|
||||||
|
add_property("enabled");
|
||||||
|
add_property("tooltip");
|
||||||
|
add_property("background_color");
|
||||||
|
add_property("foreground_color");
|
||||||
return gwidget;
|
return gwidget;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,9 +31,9 @@
|
||||||
//#define SPAWN_GUITEST2
|
//#define SPAWN_GUITEST2
|
||||||
//#define SPAWN_FILE_MANAGER
|
//#define SPAWN_FILE_MANAGER
|
||||||
//#define SPAWN_PROCESS_MANAGER
|
//#define SPAWN_PROCESS_MANAGER
|
||||||
#define SPAWN_TEXT_EDITOR
|
//#define SPAWN_TEXT_EDITOR
|
||||||
//#define SPAWN_FONTEDITOR
|
//#define SPAWN_FONTEDITOR
|
||||||
//#define SPAWN_VISUAL_BUILDER
|
#define SPAWN_VISUAL_BUILDER
|
||||||
//#define SPAWN_MULTIPLE_SHELLS
|
//#define SPAWN_MULTIPLE_SHELLS
|
||||||
//#define STRESS_TEST_SPAWNING
|
//#define STRESS_TEST_SPAWNING
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue