[Korganizer-devel] [Bug 256145] Korganizer text align bug ?
Sergio Martins
iamsergio at gmail.com
Fri Dec 31 02:41:39 CET 2010
https://bugs.kde.org/show_bug.cgi?id=256145
Sergio Martins <iamsergio at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #2 from Sergio Martins <iamsergio gmail com> 2010-12-31 02:41:38 ---
commit e7a26ec0756ee5bdad9c040fc0aef9c6ee67e6f5
branch master
Author: Sergio Martins <iamsergio at gmail.com>
Date: Fri Dec 31 01:39:56 2010 +0000
Center these columns in to-do view: priority, recurs, percent and due date.
They were already centered in the header.
BUG: 256145
diff --git a/korganizer/views/todoview/kotodomodel.cpp
b/korganizer/views/todoview/kotodomodel.cpp
index 4d7b83f..64dafcb 100644
--- a/korganizer/views/todoview/kotodomodel.cpp
+++ b/korganizer/views/todoview/kotodomodel.cpp
@@ -776,6 +776,18 @@ QVariant KOTodoModel::data( const QModelIndex &index, int
role ) const
}
}
+ if ( role == Qt::TextAlignmentRole ) {
+ switch ( index.column() ) {
+ // If you change this, change headerData() too.
+ case RecurColumn:
+ case PriorityColumn:
+ case PercentColumn:
+ case DueDateColumn:
+ return QVariant( Qt::AlignHCenter );
+ }
+ return QVariant();
+ }
+
return QVariant();
}
@@ -812,9 +824,11 @@ QVariant KOTodoModel::headerData( int column,
if ( role == Qt::TextAlignmentRole ) {
switch ( column ) {
+ // If you change this, change data() too.
case RecurColumn:
case PriorityColumn:
case PercentColumn:
+ case DueDateColumn:
return QVariant( Qt::AlignHCenter );
}
return QVariant();
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Korganizer-devel
mailing list