UI: Tweak splitter handle's painting

This commit is contained in:
Nodir Temirkhodjaev 2023-12-28 19:55:51 +03:00
parent 341777b91a
commit 3113e355eb

View File

@ -29,13 +29,11 @@ TextArea2Splitter *TextArea2SplitterHandle::splitter() const
void TextArea2SplitterHandle::paintEvent(QPaintEvent *)
{
const int handlePaintedWidth = 4;
auto rect = contentsRect();
const int margin = (rect.width() - handlePaintedWidth) / 2;
rect.adjust(margin, 0, -margin, 0);
QRect rect = contentsRect();
rect.adjust(0, 0, -2, -4);
QPainter p(this);
QStyleOption opt(0);
QStyleOption opt;
opt.rect = rect;
opt.palette = palette();
opt.state = (orientation() == Qt::Horizontal ? QStyle::State_Horizontal : QStyle::State_None)