mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 18:09:59 +03:00
Reformat, Rename, Redo
This commit is contained in:
parent
c47933d95c
commit
3fb7a0faf0
13 changed files with 297 additions and 229 deletions
|
|
@ -20,7 +20,7 @@
|
|||
#include <QApplication>
|
||||
#include <QtCore/qmath.h>
|
||||
|
||||
#include "CategorizedView.h"
|
||||
#include "GroupView.h"
|
||||
|
||||
// Origin: Qt
|
||||
static void viewItemTextLayout(QTextLayout &textLayout, int lineWidth, qreal &height,
|
||||
|
|
@ -88,7 +88,8 @@ void drawFocusRect(QPainter *painter, const QStyleOptionViewItemV4 &option, cons
|
|||
}
|
||||
|
||||
// TODO this can be made a lot prettier
|
||||
void drawProgressOverlay(QPainter *painter, const QStyleOptionViewItemV4 &option, const int value, const int maximum)
|
||||
void drawProgressOverlay(QPainter *painter, const QStyleOptionViewItemV4 &option,
|
||||
const int value, const int maximum)
|
||||
{
|
||||
if (maximum == 0 || value == maximum)
|
||||
{
|
||||
|
|
@ -251,7 +252,8 @@ void ListViewDelegate::paint(QPainter *painter, const QStyleOptionViewItem &opti
|
|||
line.draw(painter, position);
|
||||
}
|
||||
|
||||
drawProgressOverlay(painter, opt, index.data(CategorizedViewRoles::ProgressValueRole).toInt(),
|
||||
drawProgressOverlay(painter, opt,
|
||||
index.data(CategorizedViewRoles::ProgressValueRole).toInt(),
|
||||
index.data(CategorizedViewRoles::ProgressMaximumRole).toInt());
|
||||
|
||||
painter->restore();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue