freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2-demos] master 9aefe89 1/3: [ftinspect] Add buttons for faces.


From: Werner LEMBERG
Subject: [freetype2-demos] master 9aefe89 1/3: [ftinspect] Add buttons for faces.
Date: Wed, 04 May 2016 07:09:10 +0000

branch: master
commit 9aefe8914b1df6f7ad05801b3d5c399b44461771
Author: Werner Lemberg <address@hidden>
Commit: Werner Lemberg <address@hidden>

    [ftinspect] Add buttons for faces.
    
    * src/ftinspect.cpp (MainGUI::createLayout): New buttons for
    `previous face' and `next face'; they are put into a separate row
    (`fontLayout') together with the buttons for `previous font' and
    `next font'.
    s/fontSizeLayout/sizeLayout/.
    
    * src/ftinspect.h: Updated.
---
 ChangeLog         |   12 ++++++++++++
 src/ftinspect.cpp |   45 ++++++++++++++++++++++++++++-----------------
 src/ftinspect.h   |    5 ++++-
 3 files changed, 44 insertions(+), 18 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c59e6e4..43fe510 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
 2016-05-04  Werner Lemberg  <address@hidden>
 
+       [ftinspect] Add buttons for faces.
+
+       * src/ftinspect.cpp (MainGUI::createLayout): New buttons for
+       `previous face' and `next face'; they are put into a separate row
+       (`fontLayout') together with the buttons for `previous font' and
+       `next font'.
+       s/fontSizeLayout/sizeLayout/.
+
+       * src/ftinspect.h: Updated.
+
+2016-05-04  Werner Lemberg  <address@hidden>
+
        [ftinspect] Don't use size in pixels for navigation buttons.
 
        Instead, derive the width from the displayed text.
diff --git a/src/ftinspect.cpp b/src/ftinspect.cpp
index fb0f172..730bbef 100644
--- a/src/ftinspect.cpp
+++ b/src/ftinspect.cpp
@@ -517,6 +517,8 @@ MainGUI::createLayout()
 
   previousFontButton = new QPushButton(tr("Previous Font"));
   nextFontButton = new QPushButton(tr("Next Font"));
+  previousFaceButton = new QPushButton(tr("Previous Face"));
+  nextFaceButton = new QPushButton(tr("Next Face"));
 
   navigationLayout = new QHBoxLayout;
   navigationLayout->setSpacing(0);
@@ -533,28 +535,37 @@ MainGUI::createLayout()
   navigationLayout->addWidget(toEndButtonx);
   navigationLayout->addStretch(1);
 
-  fontSizeLayout = new QHBoxLayout;
-  fontSizeLayout->addWidget(sizeLabel);
-  fontSizeLayout->addWidget(sizeDoubleSpinBox);
-  fontSizeLayout->addWidget(unitsComboBox);
-  fontSizeLayout->addSpacing(10); // XXX px
-  fontSizeLayout->addWidget(dpiLabel);
-  fontSizeLayout->addWidget(dpiSpinBox);
-  fontSizeLayout->addSpacing(10); // XXX px
-  fontSizeLayout->addStretch(1);
-  fontSizeLayout->addWidget(previousFontButton);
-  fontSizeLayout->addStretch(1);
-  fontSizeLayout->addWidget(nextFontButton);
-  fontSizeLayout->addStretch(1);
-  fontSizeLayout->addSpacing(10); // XXX px
-  fontSizeLayout->addWidget(zoomLabel);
-  fontSizeLayout->addWidget(zoomSpinBox);
+  sizeLayout = new QHBoxLayout;
+  sizeLayout->addStretch(2);
+  sizeLayout->addWidget(sizeLabel);
+  sizeLayout->addWidget(sizeDoubleSpinBox);
+  sizeLayout->addWidget(unitsComboBox);
+  sizeLayout->addStretch(1);
+  sizeLayout->addWidget(dpiLabel);
+  sizeLayout->addWidget(dpiSpinBox);
+  sizeLayout->addStretch(1);
+  sizeLayout->addWidget(zoomLabel);
+  sizeLayout->addWidget(zoomSpinBox);
+  sizeLayout->addStretch(2);
+
+  fontLayout = new QHBoxLayout;
+  fontLayout->addStretch(2);
+  fontLayout->addWidget(previousFontButton);
+  fontLayout->addStretch(1);
+  fontLayout->addWidget(nextFontButton);
+  fontLayout->addStretch(1);
+  fontLayout->addWidget(previousFaceButton);
+  fontLayout->addStretch(1);
+  fontLayout->addWidget(nextFaceButton);
+  fontLayout->addStretch(2);
 
   rightLayout = new QVBoxLayout;
   rightLayout->addWidget(glyphView);
   rightLayout->addLayout(navigationLayout);
   rightLayout->addSpacing(10); // XXX px
-  rightLayout->addLayout(fontSizeLayout);
+  rightLayout->addLayout(sizeLayout);
+  rightLayout->addSpacing(10); // XXX px
+  rightLayout->addLayout(fontLayout);
 
   // for symmetry with the left side use a widget also
   rightWidget = new QWidget;
diff --git a/src/ftinspect.h b/src/ftinspect.h
index 0957753..ed82dd3 100644
--- a/src/ftinspect.h
+++ b/src/ftinspect.h
@@ -163,12 +163,13 @@ private:
   QGraphicsView *glyphView;
 
   QHBoxLayout *antiAliasingLayout;
-  QHBoxLayout *fontSizeLayout;
+  QHBoxLayout *fontLayout;
   QHBoxLayout *gammaLayout;
   QHBoxLayout *hintingModeLayout;
   QHBoxLayout *ftinspectLayout;
   QHBoxLayout *lcdFilterLayout;
   QHBoxLayout *navigationLayout;
+  QHBoxLayout *sizeLayout;
   QHBoxLayout *watchLayout;
 
   QLabel *antiAliasingLabel;
@@ -184,7 +185,9 @@ private:
   QMenu *menuFile;
   QMenu *menuHelp;
 
+  QPushButton *nextFaceButton;
   QPushButton *nextFontButton;
+  QPushButton *previousFaceButton;
   QPushButton *previousFontButton;
   QPushButton *watchButton;
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]