From a5458c882ed6cfd548497db9d24b467a2403ea2a Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Fri, 21 May 2010 11:43:45 +0200 Subject: [PATCH] More UI consistent qrc editor I altered the layout to use thin splitters so it fits better into the other UI components. Reviewed-by: thorbjorn --- .../resourceeditor/resourceeditorw.cpp | 1 - src/shared/qrceditor/qrceditor.cpp | 3 +- src/shared/qrceditor/qrceditor.ui | 177 +++++++++++------- 3 files changed, 109 insertions(+), 72 deletions(-) diff --git a/src/plugins/resourceeditor/resourceeditorw.cpp b/src/plugins/resourceeditor/resourceeditorw.cpp index 7fde0e20aef..75f9fb2265a 100644 --- a/src/plugins/resourceeditor/resourceeditorw.cpp +++ b/src/plugins/resourceeditor/resourceeditorw.cpp @@ -75,7 +75,6 @@ ResourceEditorW::ResourceEditorW(const QList &context, m_plugin(plugin) { m_resourceEditor->setResourceDragEnabled(true); - m_resourceEditor->layout()->setMargin(9); connect(m_resourceEditor, SIGNAL(dirtyChanged(bool)), this, SLOT(dirtyChanged(bool))); connect(m_resourceEditor, SIGNAL(undoStackChanged(bool, bool)), diff --git a/src/shared/qrceditor/qrceditor.cpp b/src/shared/qrceditor/qrceditor.cpp index 693faf54c61..8cb7303a885 100644 --- a/src/shared/qrceditor/qrceditor.cpp +++ b/src/shared/qrceditor/qrceditor.cpp @@ -47,9 +47,10 @@ QrcEditor::QrcEditor(QWidget *parent) layout->setSpacing(0); layout->setMargin(0); m_ui.centralWidget->setLayout(layout); - m_treeview->enableContextMenu(false); + m_treeview->setFrameStyle(QFrame::NoFrame);; layout->addWidget(m_treeview); + connect(m_ui.removeButton, SIGNAL(clicked()), this, SLOT(onRemove())); // 'Add' button with menu diff --git a/src/shared/qrceditor/qrceditor.ui b/src/shared/qrceditor/qrceditor.ui index 739b0d8c003..f9245dcaf52 100644 --- a/src/shared/qrceditor/qrceditor.ui +++ b/src/shared/qrceditor/qrceditor.ui @@ -10,9 +10,12 @@ 381 - + + + 0 + - 6 + 0 @@ -25,84 +28,118 @@ - - - - - - 0 - 0 - - - - Add - - - - - - - Remove - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + + 16777215 + 1 + + + + color: #666666 + + + QFrame::Plain + + + Qt::Horizontal + + - - - Properties - - - - QLayout::SetMinAndMaxSize + + + + 6 - - QFormLayout::ExpandingFieldsGrow + + 6 + + + 6 - - - Alias: - - - - - + + + + + + 0 + 0 + + + + Add + + + + + + + Remove + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + - - - Prefix: + + + Properties + + + QLayout::SetMinAndMaxSize + + + QFormLayout::ExpandingFieldsGrow + + + + + Alias: + + + + + + + + + + Prefix: + + + + + + + + + + Language: + + + + + + + - - - - - - - Language: - - - - - -