# # # add_file "src/view/widgets/SizeableLabel.cpp" # content [3de22c30a9764439c1427e8b49b9a647d255c6b2] # # add_file "src/view/widgets/SizeableLabel.h" # content [af4d36d710744e4300b59a4b38524db9c22787f5] # # patch "guitone.pro" # from [66e04298e56958d35176ab1aa1adef0d235dd923] # to [44021940bbffed9caffd3b96cdcddfe8238aa209] # # patch "res/forms/dialogs/changeset_browser.ui" # from [e5ab8adb8f2af1a1b6147950b460e3d4c62398f2] # to [a7502e0e2e1ced762ca26c031936a9bba8541dea] # # patch "res/forms/dialogs/commit_revision.ui" # from [3fbf41bc6b8835c9f85e328cfaa8a148922a4456] # to [3e57274b11de013d5269b24fa524669f03d3be6b] # # patch "res/forms/dialogs/preferences.ui" # from [c8d5fe2c755af7778eddbc3dffeb5389ef7f63cc] # to [14f659f4b6ba836a6c3820328f18597530330f12] # # patch "res/forms/dialogs/revision_diff.ui" # from [f8f34ee08360a9c9d8e525324d1a61f54171d2bd] # to [eda1340e3316ac5ee024272f2a8fb7b78c39d690] # ============================================================ --- src/view/widgets/SizeableLabel.cpp 3de22c30a9764439c1427e8b49b9a647d255c6b2 +++ src/view/widgets/SizeableLabel.cpp 3de22c30a9764439c1427e8b49b9a647d255c6b2 @@ -0,0 +1,38 @@ +/*************************************************************************** + * Copyright (C) 2010 by Thomas Keller * + * address@hidden * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see . * + ***************************************************************************/ + +#include "SizeableLabel.h" + +SizeableLabel::SizeableLabel(QWidget * parent) + : QLabel(parent), relativeSize(0.0) {} + +SizeableLabel::~SizeableLabel() {} + +void SizeableLabel::setRelativeSize(float size) +{ + relativeSize = size; + QFont newFont(font()); + newFont.setPointSizeF(newFont.pointSizeF() * size); + setFont(newFont); +} + +float SizeableLabel::getRelativeSize() const +{ + return relativeSize; +} + ============================================================ --- src/view/widgets/SizeableLabel.h af4d36d710744e4300b59a4b38524db9c22787f5 +++ src/view/widgets/SizeableLabel.h af4d36d710744e4300b59a4b38524db9c22787f5 @@ -0,0 +1,39 @@ +/*************************************************************************** + * Copyright (C) 2010 by Thomas Keller * + * address@hidden * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see . * + ***************************************************************************/ + +#ifndef SIZEABLE_LABEL_H +#define SIZEABLE_LABEL_H + +#include + +class SizeableLabel : public QLabel +{ + Q_OBJECT + Q_PROPERTY(float relativeSize READ getRelativeSize WRITE setRelativeSize) +public: + SizeableLabel(QWidget *); + ~SizeableLabel(); + + void setRelativeSize(float size); + float getRelativeSize() const; + +protected: + float relativeSize; +}; + +#endif ============================================================ --- guitone.pro 66e04298e56958d35176ab1aa1adef0d235dd923 +++ guitone.pro 44021940bbffed9caffd3b96cdcddfe8238aa209 @@ -37,6 +37,7 @@ HEADERS = src/view/widgets/TreeView.h \ src/view/widgets/WorkspaceMenuBar.h \ src/view/widgets/ToolBox.h \ src/view/widgets/SearchInput.h \ + src/view/widgets/SizeableLabel.h \ src/view/mainwindows/MainWindow.h \ src/view/mainwindows/WorkspaceWindow.h \ src/view/mainwindows/DatabaseWindow.h \ @@ -130,6 +131,7 @@ SOURCES += src/view/widgets/TreeView.cpp src/view/widgets/WorkspaceMenuBar.cpp \ src/view/widgets/ToolBox.cpp \ src/view/widgets/SearchInput.cpp \ + src/view/widgets/SizeableLabel.cpp \ src/view/mainwindows/MainWindow.cpp \ src/view/mainwindows/WorkspaceWindow.cpp \ src/view/mainwindows/DatabaseWindow.cpp \ ============================================================ --- res/forms/dialogs/changeset_browser.ui e5ab8adb8f2af1a1b6147950b460e3d4c62398f2 +++ res/forms/dialogs/changeset_browser.ui a7502e0e2e1ced762ca26c031936a9bba8541dea @@ -28,19 +28,25 @@ Qt::Vertical - + 5 - - 0 - + + QAbstractItemView::NoEditTriggers + + + false + true + + QAbstractItemView::SelectRows + false @@ -273,11 +279,6 @@ QPushButton:pressed, QPushButton:checked - - - 12 - - Show changes against parent ============================================================ --- res/forms/dialogs/commit_revision.ui 3fbf41bc6b8835c9f85e328cfaa8a148922a4456 +++ res/forms/dialogs/commit_revision.ui 3e57274b11de013d5269b24fa524669f03d3be6b @@ -13,6 +13,10 @@ Commit revision + + + :/icons/guitone.png:/icons/guitone.png + @@ -70,11 +74,11 @@ - - - - 9 - + + + SizeableLabel { + qproperty-relativeSize: 0.75; +} Double-click on a patch to open the diff dialog. @@ -228,8 +232,15 @@ QTextEdit
ChangeLogEdit.h
+ + SizeableLabel + QLabel +
SizeableLabel.h
+
- + + + checkAltAuthor ============================================================ --- res/forms/dialogs/preferences.ui c8d5fe2c755af7778eddbc3dffeb5389ef7f63cc +++ res/forms/dialogs/preferences.ui 14f659f4b6ba836a6c3820328f18597530330f12 @@ -166,6 +166,9 @@ The highlight color determines the backg Pick a color for the newest and oldest revision of an annotated file. The colors of the revisions in between are calculated automatically. The highlight color determines the background color of lines which have changed in the same revision.
+ + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + true @@ -176,9 +179,12 @@ The highlight color determines the backg Qt::Horizontal + + QSizePolicy::MinimumExpanding + - 24 + 10 49 @@ -187,11 +193,11 @@ The highlight color determines the backg - - - - 11 - + + + SizeableLabel { + qproperty-relativeSize: 0.85; +} oldest revision @@ -224,11 +230,11 @@ The highlight color determines the backg - - - - 11 - + + + SizeableLabel { + qproperty-relativeSize: 0.85; +} newest revision @@ -261,11 +267,11 @@ The highlight color determines the backg - - - - 11 - + + + SizeableLabel { + qproperty-relativeSize: 0.85; +} highlight @@ -315,6 +321,9 @@ The highlight color determines the backg Pick a color for added and removed lines of diffed files. + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + true @@ -325,9 +334,12 @@ The highlight color determines the backg Qt::Horizontal + + QSizePolicy::MinimumExpanding + - 36 + 10 49 @@ -336,11 +348,11 @@ The highlight color determines the backg - - - - 11 - + + + SizeableLabel { + qproperty-relativeSize: 0.85; +} added lines @@ -373,11 +385,11 @@ The highlight color determines the backg - - - - 11 - + + + SizeableLabel { + qproperty-relativeSize: 0.85; +} removed lines @@ -532,6 +544,11 @@ The highlight color determines the backg + SizeableLabel + QLabel +
SizeableLabel.h
+
+ ColorPicker QFrame
ColorPicker.h
============================================================ --- res/forms/dialogs/revision_diff.ui f8f34ee08360a9c9d8e525324d1a61f54171d2bd +++ res/forms/dialogs/revision_diff.ui eda1340e3316ac5ee024272f2a8fb7b78c39d690 @@ -1,7 +1,8 @@ - + + RevisionDiffDialog - - + + 0 0 @@ -9,25 +10,25 @@ 500 - + Loading differences - - + + :/icons/guitone.png:/icons/guitone.png - + - + - + - - + + Qt::Horizontal - + 40 20 @@ -36,24 +37,28 @@ - - + + - 11 true - + + SizeableLabel { + qproperty-relativeSize: 0.75; +} + + Double-click on a file node to display the differences in context. - - + + Qt::Horizontal - + 40 20 @@ -64,13 +69,13 @@ - + - + Qt::Horizontal - + 40 20 @@ -79,11 +84,11 @@ - - + + Close - + true @@ -98,9 +103,14 @@ QTreeView
TreeView.h
+ + SizeableLabel + QLabel +
SizeableLabel.h
+
- + @@ -109,11 +119,11 @@ RevisionDiffDialog accept() - + 214 225 - + 199 149