diff --git a/vkconfig_gui/tab_configurations.cpp b/vkconfig_gui/tab_configurations.cpp index f98371b41d..09d1a7646e 100644 --- a/vkconfig_gui/tab_configurations.cpp +++ b/vkconfig_gui/tab_configurations.cpp @@ -248,8 +248,9 @@ void TabConfigurations::UpdateUI_Layers(UpdateUIMode mode) { } } - ListItem *item = new ListItem(parameter.key.c_str()); + QListWidgetItem *item = new ListItem(parameter.key.c_str()); item->setFlags(item->flags() | Qt::ItemIsSelectable); + item->setSizeHint(QSize(0, ITEM_HEIGHT)); if (has_multiple_parameter) { item->setIcon(QIcon(":/resourcefiles/drag.png")); } diff --git a/vkconfig_gui/tab_layers.cpp b/vkconfig_gui/tab_layers.cpp index 6ead9c2268..660470f6d4 100644 --- a/vkconfig_gui/tab_layers.cpp +++ b/vkconfig_gui/tab_layers.cpp @@ -62,7 +62,7 @@ void TabLayers::UpdateUI_LayersPaths(UpdateUIMode ui_update_mode) { for (std::size_t i = 0, n = paths_group.size(); i < n; ++i) { QTreeWidgetItem *item_state = new QTreeWidgetItem; item_state->setFlags(item_state->flags() | Qt::ItemIsSelectable); - item_state->setSizeHint(0, QSize(0, 32)); + item_state->setSizeHint(0, QSize(0, ITEM_HEIGHT)); LayersPathWidget *layer_path_widget = new LayersPathWidget(paths_group[i], group_path); this->connect(layer_path_widget, SIGNAL(itemChanged()), this, SLOT(on_check_box_paths_changed())); diff --git a/vkconfig_gui/widget_tab_configurations_layer.cpp b/vkconfig_gui/widget_tab_configurations_layer.cpp index 5f195836df..74a194f3e1 100644 --- a/vkconfig_gui/widget_tab_configurations_layer.cpp +++ b/vkconfig_gui/widget_tab_configurations_layer.cpp @@ -93,10 +93,6 @@ ConfigurationLayerWidget::ConfigurationLayerWidget(TabConfigurations *tab, const } else if (!parameter.manifest.Empty()) { this->setToolTip(parameter.manifest.AbsolutePath().c_str()); } - - this->layer_state->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::MinimumExpanding); - this->layer_state->setSizeAdjustPolicy(QComboBox::AdjustToContents); - this->layer_state->adjustSize(); } bool ConfigurationLayerWidget::eventFilter(QObject *target, QEvent *event) { @@ -123,8 +119,9 @@ void ConfigurationLayerWidget::resizeEvent(QResizeEvent *event) { this->layer_state->adjustSize(); const int width_state = this->layer_state->width(); + const int height_state = this->layer_state->height(); - const QRect state_button_rect = QRect(size.width() - width_state, 0, width_state, size.height()); + const QRect state_button_rect = QRect(size.width() - width_state, 0, width_state, height_state); this->layer_state->setGeometry(state_button_rect); } }