Improvement to the ServerWindow
- sorting of Roles - resizeColumns voor zowel databases als roles - boolean columns now display check mark and cross
This commit is contained in:
parent
a3ba4d7c98
commit
9c9e78c54b
8 changed files with 71 additions and 44 deletions
|
|
@ -103,9 +103,13 @@ void PgLabItemDelegate::initStyleOption(QStyleOptionViewItem *option,
|
|||
: GetDefaultColorForType(oid);
|
||||
|
||||
option->features |= QStyleOptionViewItem::HasDisplay;
|
||||
if (oid == Pgsql::bool_oid)
|
||||
option->text = FormatBoolForDisplay(value.toBool());
|
||||
if (oid == Pgsql::bool_oid) {
|
||||
bool b = value.toBool();
|
||||
forground_color = GetDefaultBoolColor(b);
|
||||
option->text = FormatBoolForDisplay(b);
|
||||
}
|
||||
else {
|
||||
forground_color = GetDefaultColorForType(oid);
|
||||
if (meaning == DataMeaningBytes) {
|
||||
QString suffix;
|
||||
auto s = value.toLongLong();
|
||||
|
|
@ -140,9 +144,9 @@ void PgLabItemDelegate::initStyleOption(QStyleOptionViewItem *option,
|
|||
// option->text = ((f > 0) ? s.left(f) : s).toString();
|
||||
option->text = s;
|
||||
}
|
||||
option->palette.setBrush(QPalette::Text, QBrush(forground_color));
|
||||
}
|
||||
}
|
||||
option->palette.setBrush(QPalette::Text, QBrush(forground_color));
|
||||
}
|
||||
else {
|
||||
option->palette.setBrush(QPalette::Text, QBrush(GetDefaultNullColor()));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue