From ac6de72048fb50bca1823b8001fb012158050c25 Mon Sep 17 00:00:00 2001 From: Chris Holland Date: Mon, 20 May 2019 13:47:48 -0400 Subject: Draw 2 Rectangles below mount points to represent a disk capacity bar Draws overtop text that's goes below the baseline like a 'j'. It's fairly difficult to add extra space below the text as the places view is a "details" view, so the text is vertically centered in the widget's "row" as you'd desire it to in the main file view. We can make the widget 8px taller, adding 4px above and below so there's adequate room for the capacitybar, but that wastes 4px for each mount point. Ideally we'd use the "compact" view, which displays the text/size in a column beside the icon. However the compact view was not designed to take up the entire width of the viewport. It's also designed to overflow with a horizontal scrollbar. --- src/panels/places/placesitemlistwidget.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/panels/places/placesitemlistwidget.h') diff --git a/src/panels/places/placesitemlistwidget.h b/src/panels/places/placesitemlistwidget.h index 82372d622..e5763ad07 100644 --- a/src/panels/places/placesitemlistwidget.h +++ b/src/panels/places/placesitemlistwidget.h @@ -21,6 +21,8 @@ public: PlacesItemListWidget(KItemListWidgetInformant* informant, QGraphicsItem* parent); ~PlacesItemListWidget() override; + void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = nullptr) override; + protected: bool isHidden() const override; QPalette::ColorRole normalTextColorRole() const override; -- cgit v1.3.1