GUI: restable: add. small adjustement of row height and vertical text pos. in cells
This commit is contained in:
parent
801da3b265
commit
f9a4b05c2c
@ -42,6 +42,11 @@
|
|||||||
#include "rclconfig.h"
|
#include "rclconfig.h"
|
||||||
#include "plaintorich.h"
|
#include "plaintorich.h"
|
||||||
|
|
||||||
|
// Compensate for the default and somewhat bizarre vertical placement
|
||||||
|
// of text in cells
|
||||||
|
static const int ROWHEIGHTPAD = 2;
|
||||||
|
static const int TEXTINCELLVTRANS = -4;
|
||||||
|
|
||||||
//////////////////////////////////
|
//////////////////////////////////
|
||||||
// Restable "pager". We use it to display a single doc details in the
|
// Restable "pager". We use it to display a single doc details in the
|
||||||
// detail area
|
// detail area
|
||||||
@ -378,7 +383,9 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
painter->setClipRect(option.rect);
|
painter->setClipRect(option.rect);
|
||||||
painter->translate(option.rect.topLeft());
|
QPoint where = option.rect.topLeft();
|
||||||
|
where.ry() += TEXTINCELLVTRANS;
|
||||||
|
painter->translate(where);
|
||||||
document.setHtml(text);
|
document.setHtml(text);
|
||||||
document.drawContents(painter);
|
document.drawContents(painter);
|
||||||
painter->restore();
|
painter->restore();
|
||||||
@ -418,7 +425,8 @@ void ResTable::init()
|
|||||||
|
|
||||||
header = tableView->verticalHeader();
|
header = tableView->verticalHeader();
|
||||||
if (header) {
|
if (header) {
|
||||||
header->setDefaultSectionSize(QApplication::fontMetrics().height()+5);
|
header->setDefaultSectionSize(QApplication::fontMetrics().height() +
|
||||||
|
ROWHEIGHTPAD);
|
||||||
}
|
}
|
||||||
|
|
||||||
QKeySequence seq("Esc");
|
QKeySequence seq("Esc");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user