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:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user