mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-13 11:42:38 +03:00
VisualBuilder: Remove the separate property editor box in favor of inline.
Also make the property names show up in bold text. :^)
This commit is contained in:
parent
3a33b8ea08
commit
62d347d12a
Notes:
sideshowbarker
2024-07-19 14:39:30 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/62d347d12a8
@ -7,18 +7,15 @@
|
||||
VBPropertiesWindow::VBPropertiesWindow()
|
||||
{
|
||||
set_title("Properties");
|
||||
set_rect(780, 200, 220, 280);
|
||||
set_rect(780, 200, 240, 280);
|
||||
|
||||
auto* widget = new GWidget;
|
||||
widget->set_fill_with_background_color(true);
|
||||
widget->set_layout(make<GBoxLayout>(Orientation::Vertical));
|
||||
set_main_widget(widget);
|
||||
|
||||
m_text_box = new GTextBox(widget);
|
||||
m_text_box->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
|
||||
m_text_box->set_preferred_size({ 0, 21 });
|
||||
|
||||
m_table_view = new GTableView(widget);
|
||||
m_table_view->set_headers_visible(false);
|
||||
m_table_view->set_editable(true);
|
||||
}
|
||||
|
||||
|
@ -14,6 +14,5 @@ public:
|
||||
const GTableView& table_view() const { return *m_table_view; }
|
||||
|
||||
private:
|
||||
GTextBox* m_text_box { nullptr };
|
||||
GTableView* m_table_view { nullptr };
|
||||
};
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include "VBWidgetPropertyModel.h"
|
||||
#include "VBWidget.h"
|
||||
#include "VBProperty.h"
|
||||
#include <SharedGraphics/Font.h>
|
||||
|
||||
VBWidgetPropertyModel::VBWidgetPropertyModel(VBWidget& widget)
|
||||
: m_widget(widget)
|
||||
@ -29,6 +30,8 @@ String VBWidgetPropertyModel::column_name(int column) const
|
||||
GModel::ColumnMetadata VBWidgetPropertyModel::column_metadata(int column) const
|
||||
{
|
||||
UNUSED_PARAM(column);
|
||||
if (column == Column::Name)
|
||||
return { 110, TextAlignment::CenterLeft, &Font::default_bold_font() };
|
||||
return { 90, TextAlignment::CenterLeft };
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user