Commits

Aleš Erjavec  committed 53aea11

Fixed default view column sizes.

  • Participants
  • Parent commits 6fc96a5

Comments (0)

Files changed (1)

File Orange/OrangeWidgets/OWDatabasesUpdate.py

 
         box = OWGUI.widgetBox(self.controlArea, "Files")
         self.filesView = QTreeWidget(self)
-        self.filesView.setHeaderLabels(["", "Data Source", "Update",
-                                        "Last Updated", "Size"])
+        self.filesView.setHeaderLabels(
+            ["", "Data Source", "Update", "Last Updated", "Size"])
+
         self.filesView.setRootIsDecorated(False)
         self.filesView.setUniformRowHeights(True)
         self.filesView.setSelectionMode(QAbstractItemView.NoSelection)
 
         self.setEnabled(False)
 
-
     def SetFilesList(self, serverInfo):
         """
         Set the files to show.
 
         self.progress.advance()
 
-        for column in range(4):
-            whint = self.filesView.sizeHintForColumn(column)
-            width = min(whint, 400)
+        self.filesView.setColumnWidth(0, self.filesView.sizeHintForColumn(0))
+
+        for column in range(1, 4):
+            contents_hint = self.filesView.sizeHintForColumn(column)
+            header_hint = self.filesView.header().sectionSizeHint(column)
+            width = max(min(contents_hint, 400), header_hint)
             self.filesView.setColumnWidth(column, width)
 
         self.lineEditFilter.setItems([hint for hint in sorted(all_tags)