Commit c315020a authored by Harald Sitter's avatar Harald Sitter 🏳️‍🌈
Browse files

force-resize columns in the wayland module

inspired by similar code in the opengl module. since tree columns can
have wildly different size requirements based on the content we'll want
to resize them to ensure labels can be displayed completely

BUG: 433327
FIXED-IN: 5.21.3
parent 7ef1d289
Copyright 2014 Martin Gräßlin <>
Copyright 2021 Harald Sitter <>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
......@@ -66,6 +67,15 @@ void WaylandModule::init()
auto interfacesItem = new QTreeWidgetItem(compositorItem, QStringList() << i18n("Interfaces") << i18n("Interface Version"));
auto resizeColumns = [this] {
for (int i = 0; i < m_tree->columnCount(); ++i) {
connect(m_tree, &QTreeWidget::expanded, this, resizeColumns);
connect(m_tree, &QTreeWidget::collapsed, this, resizeColumns);
connect(m_tree->model(), &QAbstractItemModel::dataChanged, this, resizeColumns);
connect(m_connection, &ConnectionThread::connected, this,
[this, compositorItem, interfacesItem] {
Registry *registry = new Registry(this);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment