freetype-commit
[Top][All Lists]
Advanced

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

[Git][freetype/freetype-demos][gsoc-2022-chariri-3] * src/ftinspect/**:


From: Charlie Jiang (@cqjjjzr)
Subject: [Git][freetype/freetype-demos][gsoc-2022-chariri-3] * src/ftinspect/**: Add tooltips to most UI controls.
Date: Thu, 25 Aug 2022 12:21:56 +0000

Charlie Jiang pushed to branch gsoc-2022-chariri-3 at FreeType / FreeType Demo Programs

Commits:

  • 75910260
    by Charlie Jiang at 2022-08-25T20:20:46+08:00
    * src/ftinspect/**: Add tooltips to most UI controls.
    

11 changed files:

Changes:

  • src/ftinspect/maingui.cpp
    ... ... @@ -264,6 +264,16 @@ MainGUI::createLayout()
    264 264
       tabs_.append(infoTab_);
    
    265 265
       tabWidget_->addTab(infoTab_, tr("Font Info"));
    
    266 266
       
    
    267
    +  tabWidget_->setTabToolTip(0, tr("View single glyph in grid view.\n"
    
    268
    +                                  "For pixelwise inspection of the glyphs."));
    
    269
    +  tabWidget_->setTabToolTip(1, tr("View a string of glyphs continuously.\n"
    
    270
    +                                  "Show all glyphs in the font or render "
    
    271
    +                                  "strings."));
    
    272
    +  tabWidget_->setTabToolTip(2, tr("Compare the output of the font "
    
    273
    +                                  "in different rendering settings "
    
    274
    +                                  "(e.g. hintings)."));
    
    275
    +  tabWidget_->setTabToolTip(3, tr("View font info and metadata."));
    
    276
    +  
    
    267 277
       tripletSelector_ = new TripletSelector(this, engine_);
    
    268 278
     
    
    269 279
       rightLayout_ = new QVBoxLayout;
    

  • src/ftinspect/panels/comparator.cpp
    ... ... @@ -89,15 +89,18 @@ ComperatorTab::createLayout()
    89 89
       sizeSelector_ = new FontSizeSelector(this);
    
    90 90
       charMapLabel_ = new QLabel(tr("Char Map:"), this);
    
    91 91
       charMapSelector_ = new CharMapComboBox(this, engine_, false);
    
    92
    -
    
    93 92
       sourceTextEdit_ = new QPlainTextEdit(QString(ComparatorDefaultText), this);
    
    94 93
     
    
    94
    +  sizeSelector_->installEventFilterForWidget(this);
    
    95
    +
    
    95 96
       for (int i = 0; i < ColumnWidth; ++i)
    
    96 97
       {
    
    97 98
         auto frame = new QFrame(this);
    
    98 99
         auto canvas = new GlyphContinuous(frame, engine_);
    
    99 100
         auto settingPanel = new SettingPanel(this, engine_, true);
    
    100
    -    
    
    101
    +
    
    102
    +    sizeSelector_->installEventFilterForWidget(canvas);
    
    103
    +
    
    101 104
         canvas->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred);
    
    102 105
         settingPanel->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
    
    103 106
     
    
    ... ... @@ -116,6 +119,10 @@ ComperatorTab::createLayout()
    116 119
       sourceWidget_ = new QWidget(this);
    
    117 120
       sourceWidget_->setMaximumWidth(350);
    
    118 121
     
    
    122
    +  // Tooltips
    
    123
    +  sourceTextEdit_->setToolTip(tr("Source text for previewing"));
    
    124
    +
    
    125
    +  // Layouting
    
    119 126
       layout_ = new QGridLayout;
    
    120 127
     
    
    121 128
       charMapLayout_ = new QHBoxLayout;
    

  • src/ftinspect/panels/continuous.cpp
    ... ... @@ -8,6 +8,7 @@
    8 8
     #include "../uihelper.hpp"
    
    9 9
     
    
    10 10
     #include <climits>
    
    11
    +#include <QToolTip>
    
    11 12
     #include <QVariant>
    
    12 13
     
    
    13 14
     
    
    ... ... @@ -255,6 +256,26 @@ ContinuousTab::openWaterfallConfig()
    255 256
     }
    
    256 257
     
    
    257 258
     
    
    259
    +void
    
    260
    +ContinuousTab::showToolTip()
    
    261
    +{
    
    262
    +  // TODO: tooltips
    
    263
    +  QToolTip::showText(mapToGlobal(helpButton_->pos()),
    
    264
    +                     tr(
    
    265
    +R"(Shift + Scroll: Adjust Font Size
    
    266
    +Shift + Plus/Minus: Adjust Font Size
    
    267
    +Shift + 0: Reset Font Size to Default
    
    268
    +Left Click: Show Glyph Details Info
    
    269
    +Right Click: Inspect Glyph in Singular Grid View
    
    270
    +
    
    271
    +<All Glyphs Source>
    
    272
    +  Drag: Adjust Begin Index
    
    273
    +<Text String Source>
    
    274
    +  Drag: Move String Position)"),
    
    275
    +                     helpButton_);
    
    276
    +}
    
    277
    +
    
    278
    +
    
    258 279
     bool
    
    259 280
     ContinuousTab::eventFilter(QObject* watched,
    
    260 281
                                QEvent* event)
    
    ... ... @@ -334,8 +355,10 @@ ContinuousTab::createLayout()
    334 355
       strokeRadiusLabel_ = new QLabel(tr("Stroke Radius:"), this);
    
    335 356
       rotationLabel_ = new QLabel(tr("Rotation:"), this);
    
    336 357
     
    
    337
    -  resetPositionButton_ = new QPushButton(tr("Reset Pos"));
    
    338
    -  waterfallConfigButton_ = new QPushButton(tr("WF Config"));
    
    358
    +  resetPositionButton_ = new QPushButton(tr("Reset Pos"), this);
    
    359
    +  waterfallConfigButton_ = new QPushButton(tr("WF Config"), this);
    
    360
    +  helpButton_ = new QPushButton(this);
    
    361
    +  helpButton_->setText(tr("?"));
    
    339 362
     
    
    340 363
       xEmboldeningSpinBox_ = new QDoubleSpinBox(this);
    
    341 364
       yEmboldeningSpinBox_ = new QDoubleSpinBox(this);
    
    ... ... @@ -361,12 +384,49 @@ ContinuousTab::createLayout()
    361 384
     
    
    362 385
       wfConfigDialog_ = new WaterfallConfigDialog(this);
    
    363 386
     
    
    387
    +  // Tooltips
    
    388
    +  sourceSelector_->setToolTip(tr("Choose what to display as the text source."));
    
    389
    +  modeSelector_->setToolTip(
    
    390
    +    tr("Choose the special effect in which the text is displayed."));
    
    391
    +  strokeRadiusSpinBox_->setToolTip(
    
    392
    +    tr("Stroke corner radius (only available when mode set to Stroked)"));
    
    393
    +  rotationSpinBox_->setToolTip(tr("Rotation, in degrees"));
    
    394
    +  xEmboldeningSpinBox_->setToolTip(
    
    395
    +    tr("Horizontal Emboldening (only available when mode set to Fancy)"));
    
    396
    +  yEmboldeningSpinBox_->setToolTip(
    
    397
    +    tr("Vertical Emboldening (only available when mode set to Fancy)"));
    
    398
    +  slantSpinBox_->setToolTip(
    
    399
    +    tr("Slanting (only available when mode set to Fancy)"));
    
    400
    +  sourceTextEdit_->setToolTip(
    
    401
    +    tr("Source string (only available when source set to Text String)"));
    
    402
    +  waterfallConfigButton_->setToolTip(tr(
    
    403
    +    "Set waterfall start and end size. Not available when the font is not\n"
    
    404
    +    "scalable because in such case all available sizes would be displayed."));
    
    405
    +  sampleStringSelector_->setToolTip(
    
    406
    +    tr("Select preset sample strings (only available when source set to\nText "
    
    407
    +       "String)"));
    
    408
    +  resetPositionButton_->setToolTip(tr("Reset the position to the center (only "
    
    409
    +                                      "available when source set to\nText "
    
    410
    +                                      "String)"));
    
    411
    +  waterfallCheckBox_->setToolTip(tr(
    
    412
    +    "Enable waterfall mode: show the font output in different sizes.\nWill "
    
    413
    +    "show all available sizes when the font is not scalable."));
    
    414
    +  verticalCheckBox_->setToolTip(tr("Enable vertical rendering (only available\n"
    
    415
    +                                "when source set to Text String)"));
    
    416
    +  kerningCheckBox_->setToolTip(tr("Enable kerning (GPOS table unsupported)"));
    
    417
    +  helpButton_->setToolTip(tr("Get mouse helps"));
    
    418
    +
    
    419
    +  // Layouting
    
    364 420
       canvasFrameLayout_ = new QHBoxLayout;
    
    365 421
       canvasFrameLayout_->addWidget(canvas_);
    
    366 422
       canvasFrame_->setLayout(canvasFrameLayout_);
    
    367 423
       canvasFrameLayout_->setContentsMargins(2, 2, 2, 2);
    
    368 424
       canvasFrame_->setContentsMargins(2, 2, 2, 2);
    
    369 425
     
    
    426
    +  sizeHelpLayout_ = new QHBoxLayout;
    
    427
    +  sizeHelpLayout_->addWidget(sizeSelector_, 1, Qt::AlignVCenter);
    
    428
    +  sizeHelpLayout_->addWidget(helpButton_, 0);
    
    429
    +
    
    370 430
       bottomLayout_ = new QGridLayout;
    
    371 431
       bottomLayout_->addWidget(sourceLabel_, 0, 0);
    
    372 432
       bottomLayout_->addWidget(modeLabel_, 1, 0);
    
    ... ... @@ -400,7 +460,7 @@ ContinuousTab::createLayout()
    400 460
     
    
    401 461
       mainLayout_ = new QVBoxLayout;
    
    402 462
       mainLayout_->addWidget(canvasFrame_);
    
    403
    -  mainLayout_->addWidget(sizeSelector_);
    
    463
    +  mainLayout_->addLayout(sizeHelpLayout_);
    
    404 464
       mainLayout_->addLayout(bottomLayout_);
    
    405 465
     
    
    406 466
       setLayout(mainLayout_);
    
    ... ... @@ -442,6 +502,8 @@ ContinuousTab::createConnections()
    442 502
               canvas_, &GlyphContinuous::resetPositionDelta);
    
    443 503
       connect(waterfallConfigButton_, &QPushButton::clicked,
    
    444 504
               this, &ContinuousTab::openWaterfallConfig);
    
    505
    +  connect(helpButton_, &QPushButton::clicked,
    
    506
    +          this, &ContinuousTab::showToolTip);
    
    445 507
       connect(wfConfigDialog_, &WaterfallConfigDialog::sizeUpdated,
    
    446 508
               this, &ContinuousTab::repaintGlyph);
    
    447 509
     
    
    ... ... @@ -562,14 +624,22 @@ WaterfallConfigDialog::createLayout()
    562 624
       endSpinBox_->setValue(1);
    
    563 625
     
    
    564 626
       autoBox_ = new QCheckBox(tr("Auto"), this);
    
    565
    -  
    
    627
    +  autoBox_->setChecked(true);
    
    628
    +
    
    629
    +  // Tooltips
    
    630
    +  autoBox_->setToolTip(tr(
    
    631
    +    "Use the default value which will try to start from near zero and place "
    
    632
    +    "in the middle of the screen the size selected in the selector."));
    
    633
    +  startSpinBox_->setToolTip(tr("Start size, will be always guaranteed."));
    
    634
    +  endSpinBox_->setToolTip(tr(
    
    635
    +    "End size, may not be guaranteed due to rounding and precision issues."));
    
    636
    +
    
    637
    +  // Layouting
    
    566 638
       layout_ = new QGridLayout;
    
    567 639
       gridLayout2ColAddWidget(layout_, autoBox_);
    
    568 640
       gridLayout2ColAddWidget(layout_, startLabel_, startSpinBox_);
    
    569 641
       gridLayout2ColAddWidget(layout_, endLabel_, endSpinBox_);
    
    570 642
     
    
    571
    -  autoBox_->setChecked(true);
    
    572
    -
    
    573 643
       setLayout(layout_);
    
    574 644
     }
    
    575 645
     
    

  • src/ftinspect/panels/continuous.hpp
    ... ... @@ -63,6 +63,7 @@ public:
    63 63
                               int charMapIndex, 
    
    64 64
                               bool open);
    
    65 65
       void openWaterfallConfig();
    
    66
    +  void showToolTip();
    
    66 67
     
    
    67 68
     signals:
    
    68 69
       void switchToSingular(int glyphIndex, double sizePoint);
    
    ... ... @@ -92,6 +93,7 @@ private:
    92 93
     
    
    93 94
       QPushButton* resetPositionButton_;
    
    94 95
       QPushButton* waterfallConfigButton_;
    
    96
    +  QPushButton* helpButton_;
    
    95 97
     
    
    96 98
       QLabel* modeLabel_;
    
    97 99
       QLabel* sourceLabel_;
    
    ... ... @@ -116,6 +118,7 @@ private:
    116 118
       QPlainTextEdit* sourceTextEdit_;
    
    117 119
       
    
    118 120
       QHBoxLayout* canvasFrameLayout_;
    
    121
    +  QHBoxLayout* sizeHelpLayout_;
    
    119 122
       QGridLayout* bottomLayout_;
    
    120 123
       QVBoxLayout* mainLayout_;
    
    121 124
     
    

  • src/ftinspect/panels/glyphdetails.cpp
    ... ... @@ -124,6 +124,27 @@ GlyphDetails::createLayout()
    124 124
       setLabelSelectable(inkSizeLabel_);
    
    125 125
       setLabelSelectable(bitmapOffsetLabel_);
    
    126 126
     
    
    127
    +  // Tooltips
    
    128
    +  fontUnitButton_->setToolTip(tr("Unit for most metrics entries below"));
    
    129
    +  pointButton_   ->setToolTip(tr("Unit for most metrics entries below"));
    
    130
    +  pixelButton_   ->setToolTip(tr("Unit for most metrics entries below"));
    
    131
    +  bboxSizeLabel_->setToolTip(
    
    132
    +    tr("Glyph bounding box (in unit specified above)"));
    
    133
    +  horiBearingLabel_->setToolTip(
    
    134
    +    tr("Bearing for horizontal layout (in unit specified above)"));
    
    135
    +  horiAdvanceLabel_->setToolTip(
    
    136
    +    tr("Advance for horizontal layout (in unit specified above)"));
    
    137
    +  vertBearingLabel_->setToolTip(
    
    138
    +    tr("Bearing for vertical layout (in unit specified above)"));
    
    139
    +  vertAdvanceLabel_->setToolTip(
    
    140
    +    tr("Advance for vertical layout (in unit specified above)"));
    
    141
    +  inkSizeLabel_->setToolTip(
    
    142
    +    tr("The tightest bounding box size (always in pixels)"));
    
    143
    +  bitmapOffsetLabel_->setToolTip(
    
    144
    +    tr("Offset from the most top-left point to the bitmap (always in pixels)"));
    
    145
    +  bitmapWidget_->setToolTip(tr("Bitmap preview"));
    
    146
    +
    
    147
    +  // Layouting
    
    127 148
       unitLayout_ = new QHBoxLayout;
    
    128 149
       unitLayout_->addWidget(fontUnitButton_);
    
    129 150
       unitLayout_->addWidget(pointButton_);
    

  • src/ftinspect/panels/settingpanel.cpp
    ... ... @@ -538,6 +538,46 @@ SettingPanel::createLayout()
    538 538
       tab_->setSizePolicy(QSizePolicy::MinimumExpanding,
    
    539 539
                           QSizePolicy::MinimumExpanding);
    
    540 540
     
    
    541
    +  // Tooltips
    
    542
    +  hintingCheckBox_->setToolTip(tr("Enable hinting a.k.a. grid-fitting."));
    
    543
    +  hintingModeComboBox_->setToolTip(
    
    544
    +    tr("Modes not available for current font type will be disabled. No "
    
    545
    +       "effect when auto-hinting is enabled"));
    
    546
    +  autoHintingCheckBox_->setToolTip(tr("Enable FreeType Auto-Hinter."));
    
    547
    +  if (debugMode_)
    
    548
    +  {
    
    549
    +    horizontalHintingCheckBox_->setToolTip(tr("(auto-hinter debug option)"));
    
    550
    +    verticalHintingCheckBox_  ->setToolTip(tr("(auto-hinter debug option)"));
    
    551
    +    blueZoneHintingCheckBox_  ->setToolTip(tr("(auto-hinter debug option)"));
    
    552
    +    segmentDrawingCheckBox_   ->setToolTip(tr("(auto-hinter debug option)"));
    
    553
    +  }
    
    554
    +  antiAliasingComboBox_->setToolTip(tr("Select anti-aliasing mode."));
    
    555
    +  lcdFilterComboBox_->setToolTip(
    
    556
    +    tr("Select LCD filter (only valid when LCD AA is enabled)."));
    
    557
    +  embeddedBitmapCheckBox_->setToolTip(tr(
    
    558
    +    "Enable embedded bitmap strikes (force enabled for bitmap-only fonts)."));
    
    559
    +  stemDarkeningCheckBox_->setToolTip(
    
    560
    +    tr("Enable stem darkening (only valid for auto-hinter with gamma "
    
    561
    +       "correction enabled)."));
    
    562
    +  gammaSlider_->setToolTip("Gamma correction value.");
    
    563
    +  colorLayerCheckBox_->setToolTip(tr("Enable color layer rendering."));
    
    564
    +  paletteComboBox_->setToolTip(tr("Select color layer palette (only valid when "
    
    565
    +                                  "any palette exists in the font)."));
    
    566
    +  if (comparatorMode_)
    
    567
    +  {
    
    568
    +    kerningCheckBox_->setToolTip(
    
    569
    +      tr("Enable kerning (GPOS table not supported)."));
    
    570
    +    lsbRsbDeltaCheckBox_->setToolTip(
    
    571
    +      tr("Enable LSB/RSB delta positioning (only valid when hinting is "
    
    572
    +         "enabled)."));
    
    573
    +  }
    
    574
    +  if (!comparatorMode_)
    
    575
    +  {
    
    576
    +    backgroundButton_->setToolTip(tr("Set canvas background color."));
    
    577
    +    foregroundButton_->setToolTip(tr("Set text color."));
    
    578
    +  }
    
    579
    +
    
    580
    +  // Layouting
    
    541 581
       if (debugMode_)
    
    542 582
       {
    
    543 583
         debugLayout_ = new QVBoxLayout;
    
    ... ... @@ -563,7 +603,6 @@ SettingPanel::createLayout()
    563 603
       setLayout(mainLayout_);
    
    564 604
       mainLayout_->setContentsMargins(0, 0, 0, 0);
    
    565 605
       setContentsMargins(0, 0, 0, 0);
    
    566
    -  
    
    567 606
     }
    
    568 607
     
    
    569 608
     
    
    ... ... @@ -615,6 +654,9 @@ SettingPanel::createLayoutNormal()
    615 654
     
    
    616 655
       tab_->addTab(generalTab_, tr("General"));
    
    617 656
       tab_->addTab(mmgxPanel_, tr("MM/GX"));
    
    657
    +
    
    658
    +  tab_->setTabToolTip(0, tr("General settings."));
    
    659
    +  tab_->setTabToolTip(1, tr("MM/GX axis parameters."));
    
    618 660
     }
    
    619 661
     
    
    620 662
     
    
    ... ... @@ -660,6 +702,9 @@ SettingPanel::createLayoutComperator()
    660 702
       tab_->addTab(hintingRenderingTab_, tr("Hinting && Rendering"));
    
    661 703
       tab_->addTab(generalTab_, tr("General"));
    
    662 704
       tab_->addTab(mmgxPanel_, tr("MM/GX"));
    
    705
    +  tab_->setTabToolTip(0, tr("Settings about hinting and rendering."));
    
    706
    +  tab_->setTabToolTip(1, tr("General settings."));
    
    707
    +  tab_->setTabToolTip(2, tr("MM/GX axis parameters."));
    
    663 708
       setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Maximum);
    
    664 709
     }
    
    665 710
     
    

  • src/ftinspect/panels/singular.cpp
    ... ... @@ -313,6 +313,23 @@ SingularTab::createLayout()
    313 313
       showGridCheckBox_ = new QCheckBox(tr("Show Grid"), this);
    
    314 314
       showAuxLinesCheckBox_ = new QCheckBox(tr("Show Aux. Lines"), this);
    
    315 315
     
    
    316
    +  // Tooltips
    
    317
    +  zoomSpinBox_->setToolTip(tr("Adjust grid zoom."));
    
    318
    +  centerGridButton_->setToolTip(tr(
    
    319
    +    "Move the viewport so the origin point is at the center of the view."));
    
    320
    +  showBitmapCheckBox_->setToolTip(tr("Show glyph bitmap."));
    
    321
    +  showPointsCheckBox_->setToolTip(
    
    322
    +    tr("Show control points (only valid when the glyph is an outline glyph)."));
    
    323
    +  showPointNumbersCheckBox_->setToolTip(
    
    324
    +    tr("Show point numbers (only available when points are shown)."));
    
    325
    +  showOutlinesCheckBox_->setToolTip(tr("Show (vector) outline (only valid when "
    
    326
    +                                       "the glyph is an outline glyph)."));
    
    327
    +  showGridCheckBox_->setToolTip(tr("Show grid lines (x axis: baseline)."));
    
    328
    +  showBitmapCheckBox_->setToolTip(
    
    329
    +    tr("Show auxiliary lines (blue: y-advance; red: ascender/descender)."));
    
    330
    +  helpButton_->setToolTip(tr("View scroll help"));
    
    331
    +
    
    332
    +  // Layouting
    
    316 333
       indexHelpLayout_ = new QHBoxLayout;
    
    317 334
       indexHelpLayout_->addWidget(indexSelector_, 1);
    
    318 335
       indexHelpLayout_->addWidget(helpButton_);
    

  • src/ftinspect/widgets/charmapcombobox.cpp
    ... ... @@ -14,6 +14,7 @@ CharMapComboBox::CharMapComboBox(QWidget* parent,
    14 14
       haveGlyphOrder_(haveGlyphOrder),
    
    15 15
       engine_(engine)
    
    16 16
     {
    
    17
    +  setToolTip("Set current charmap.");
    
    17 18
     }
    
    18 19
     
    
    19 20
     
    

  • src/ftinspect/widgets/fontsizeselector.cpp
    ... ... @@ -194,6 +194,16 @@ FontSizeSelector::createLayout()
    194 194
       dpiSpinBox_->setRange(10, 600);
    
    195 195
       dpiLabel_->setBuddy(dpiSpinBox_);
    
    196 196
     
    
    197
    +  // Tooltips
    
    198
    +  sizeDoubleSpinBox_->setToolTip(
    
    199
    +    tr("Size value (will be limited to available sizes if\nthe current font "
    
    200
    +       "is not scalable)."));
    
    201
    +  unitsComboBox_->setToolTip(tr("Unit for the size value (force to pixel if\n"
    
    202
    +                                "the current font is not scalable)."));
    
    203
    +  dpiSpinBox_->setToolTip(
    
    204
    +    tr("DPI for the point size value (only valid when the unit is point)."));
    
    205
    +
    
    206
    +  // Layouting
    
    197 207
       layout_ = new QHBoxLayout;
    
    198 208
     
    
    199 209
       layout_->addStretch(1);
    

  • src/ftinspect/widgets/glyphindexselector.cpp
    ... ... @@ -155,6 +155,11 @@ GlyphIndexSelector::createLayout()
    155 155
       setButtonNarrowest(toP1000Button_);
    
    156 156
       setButtonNarrowest(toEndButton_);
    
    157 157
     
    
    158
    +  // Toltips
    
    159
    +  indexSpinBox_->setToolTip("Current glyph index.");
    
    160
    +  indexLabel_->setToolTip("Current glyph index/range and the max index.");
    
    161
    +
    
    162
    +  // Layouting
    
    158 163
       navigationLayout_ = new QHBoxLayout;
    
    159 164
       navigationLayout_->setSpacing(0);
    
    160 165
       navigationLayout_->addStretch(3);
    

  • src/ftinspect/widgets/tripletselector.cpp
    ... ... @@ -319,7 +319,7 @@ TripletSelector::createLayout()
    319 319
     {
    
    320 320
       fontComboBox_ = new QComboBox(this);
    
    321 321
       faceComboBox_ = new QComboBox(this);
    
    322
    -  niComboBox_    = new QComboBox(this);
    
    322
    +  niComboBox_   = new QComboBox(this);
    
    323 323
     
    
    324 324
       fontComboBox_->setPlaceholderText(tr("No font open"));
    
    325 325
       faceComboBox_->setPlaceholderText(tr("No face available"));
    
    ... ... @@ -352,6 +352,20 @@ TripletSelector::createLayout()
    352 352
       faceDownButton_ ->setFixedSize(30, 30);
    
    353 353
       niDownButton_   ->setFixedSize(30, 30);
    
    354 354
     
    
    355
    +  // Tooltips
    
    356
    +  fontComboBox_->setToolTip(tr("Current font"));
    
    357
    +  faceComboBox_->setToolTip(tr("Current subfont (face)"));
    
    358
    +  niComboBox_->setToolTip(
    
    359
    +    tr("Current named instance (only available for variable fonts)"));
    
    360
    +  closeFontButton_->setToolTip(tr("Close current font"));
    
    361
    +  fontUpButton_   ->setToolTip(tr("Previous font"));
    
    362
    +  faceUpButton_   ->setToolTip(tr("Previous subfont (face)"));
    
    363
    +  niUpButton_     ->setToolTip(tr("Previous named instance"));
    
    364
    +  fontDownButton_ ->setToolTip(tr("Next font"));
    
    365
    +  faceDownButton_ ->setToolTip(tr("Next subfont (face)"));
    
    366
    +  niDownButton_   ->setToolTip(tr("Next named instance"));
    
    367
    +
    
    368
    +  // Layouting
    
    355 369
       layout_ = new QHBoxLayout;
    
    356 370
       layout_->setSpacing(0);
    
    357 371
       layout_->setContentsMargins(0, 0, 0, 0);
    
    ... ... @@ -435,7 +449,7 @@ TripletSelector::loadTriplet()
    435 449
         }
    
    436 450
       }
    
    437 451
     
    
    438
    -  auto number = engine_->loadFont(fontIndex, faceIndex, instanceIndex);
    
    452
    +  engine_->loadFont(fontIndex, faceIndex, instanceIndex);
    
    439 453
       
    
    440 454
       // TODO: This may messes up with bitmap-only fonts.
    
    441 455
       if (!engine_->fontValid())
    


  • reply via email to

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