diff --git a/plugins/DigitalLibrary/resources/qml/Table.qml b/plugins/DigitalLibrary/resources/qml/Table.qml index b503bb8e2f..0f539675a0 100644 --- a/plugins/DigitalLibrary/resources/qml/Table.qml +++ b/plugins/DigitalLibrary/resources/qml/Table.qml @@ -90,7 +90,7 @@ Item new_width -= sum_widths - tableBase.width; //Limit the total width to not exceed the view. } let width_fraction = new_width / tableBase.width; //Scale with the same fraction along with the total width, if the table is resized. - parent.parent.width = Qt.binding(function() { return tableBase.width * width_fraction }); + parent.parent.width = Qt.binding(function() { return Math.max(10, Math.round(tableBase.width * width_fraction)) }); } } } diff --git a/resources/qml/TableView.qml b/resources/qml/TableView.qml index 1fedc34ca0..1075ce1f8a 100644 --- a/resources/qml/TableView.qml +++ b/resources/qml/TableView.qml @@ -91,7 +91,7 @@ Item new_width -= sum_widths - tableBase.width; //Limit the total width to not exceed the view. } let width_fraction = new_width / tableBase.width; //Scale with the same fraction along with the total width, if the table is resized. - parent.parent.width = Qt.binding(function() { return tableBase.width * width_fraction }); + parent.parent.width = Qt.binding(function() { return Math.max(10, Math.round(tableBase.width * width_fraction)) }); } } }