[kompare] [Bug 481778] Text in lines is cut in half, only lower half of the line text is visible when font size less than 14
Luis
bugzilla_noreply at kde.org
Tue Aug 19 21:54:20 BST 2025
https://bugs.kde.org/show_bug.cgi?id=481778
Luis <stereomato at proton.me> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |stereomato at proton.me
--- Comment #22 from Luis <stereomato at proton.me> ---
(In reply to Christoph Feck from comment #20)
> What worked for me is forcing Top alignment. I didn't really understand the
> logic behind paintHeight(), so the patch might be all wrong.
>
> diff --git a/src/komparepart/komparelistview.cpp
> b/src/komparepart/komparelistview.cpp
> index 61cd7bb..3deb472 100644
> --- a/src/komparepart/komparelistview.cpp
> +++ b/src/komparepart/komparelistview.cpp
> @@ -745,7 +745,7 @@ void KompareListViewLineItem::init(int line,
> DifferenceString* text)
> void KompareListViewLineItem::paintCell(QPainter* p, const
> QStyleOptionViewItem& option, int column)
> {
> int width = option.rect.width();
> - Qt::Alignment align = option.displayAlignment;
> + Qt::Alignment align = option.displayAlignment & ~Qt::AlignVCenter |
> Qt::AlignTop;
>
> p->setRenderHint(QPainter::Antialiasing);
> p->translate(option.rect.topLeft());
Does work for me too.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Kompare-devel
mailing list