OSDN Git Service

連想ノートリストの関連度の表示方法を少しだけ変更。
authoryuki <kimaira7@gmail.com>
Mon, 25 Mar 2013 05:52:52 +0000 (14:52 +0900)
committeryuki <kimaira7@gmail.com>
Mon, 25 Mar 2013 05:52:52 +0000 (14:52 +0900)
src/cx/fbn/nevernote/gui/RensoNoteListItem.java

index 359919f..fccaee3 100644 (file)
@@ -83,21 +83,25 @@ public class RensoNoteListItem extends QWidget{
                
                // 項目の中身
                // フォント設定
-               painter.setPen(QColor.black);
+               QFont relationFont = new QFont();
+               relationFont.setPixelSize(35);
+               relationFont.setBold(true);
                QFont titleFont = new QFont();
                titleFont.setPixelSize(15);
                titleFont.setBold(true);
                QFont normalFont = new QFont();
                normalFont.setPixelSize(12);
                
-               // タイトル
-               painter.setFont(titleFont);
-               painter.drawText(85, 3, size().width() - 135, 20, Qt.AlignmentFlag.AlignLeft.value(), noteTitle);
                // 関連度
                double ratio = (double)relationPoints / allPointSum;
                int green = (int) (255 * (1.0 - ratio));
-               painter.setPen(new QColor(255, green, 0));
-               painter.drawText(size().width() - 45, 3, 45, 20, Qt.AlignmentFlag.AlignRight.value(), String.valueOf((int)(ratio * 100)) + "%");
+               painter.setPen(new QColor(255, green, 0, 120));
+               painter.setFont(relationFont);
+               painter.drawText(85, size().height() - 40, size().width() - 85, 40, Qt.AlignmentFlag.AlignRight.value(), String.valueOf((int)(ratio * 100)) + "%");
+               // タイトル
+               painter.setPen(QColor.black);
+               painter.setFont(titleFont);
+               painter.drawText(85, 3, size().width() - 85, 20, Qt.AlignmentFlag.AlignLeft.value(), noteTitle);
                // ノート作成日時
                painter.setFont(normalFont);
                painter.setPen(new QColor(60, 65, 255));