ui: Fixed layout of QtBookmarkBrowser

* fixed window size and resizing
* fixed layout and spacing
* removed focus rects on Mac
* fixed filter dropdown style for Mac
* reuse button handling from QtWindow
* use different colors for category and bookmark rows
* allow clicking full row for expansion
* show edit and delete button only on hover
* ellide bookmark name when little space
This commit is contained in:
Eberhard Graether
2017-03-20 15:01:18 +01:00
parent a96bba67cb
commit 8ffc2f281c
14 changed files with 382 additions and 441 deletions
+7
View File
@@ -28,6 +28,13 @@ namespace utility
widget->setAutoFillBackground(true);
}
void setWidgetRetainsSpaceWhenHidden(QWidget* widget)
{
QSizePolicy pol = widget->sizePolicy();
pol.setRetainSizeWhenHidden(true);
widget->setSizePolicy(pol);
}
void loadFontsFromDirectory(const std::string& path, const std::string& extension)
{
std::vector<std::string> extensions;
+2
View File
@@ -12,6 +12,8 @@ class QWidget;
namespace utility
{
void setWidgetBackgroundColor(QWidget* widget, const std::string& color);
void setWidgetRetainsSpaceWhenHidden(QWidget* widget);
void loadFontsFromDirectory(const std::string& path, const std::string& extension = ".otf");
std::string getStyleSheet(const std::string& path);