freetype-commit
[Top][All Lists]
Advanced

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

[freetype2-demos] gsoc-2022-chariri-2 cc3163b 10/30: [ftinspect] Add mis


From: Werner Lemberg
Subject: [freetype2-demos] gsoc-2022-chariri-2 cc3163b 10/30: [ftinspect] Add missing event connections for setting panel.
Date: Mon, 11 Jul 2022 07:17:38 -0400 (EDT)

branch: gsoc-2022-chariri-2
commit cc3163bd4c49610dce891d8ad1ef3ba2d14775d7
Author: Charlie Jiang <w@chariri.moe>
Commit: Charlie Jiang <w@chariri.moe>

    [ftinspect] Add missing event connections for setting panel.
    
    Some event connections are missing, so the glyph view can't be updated in 
time
    when the settings changes. This commit fixes this.
    
    * src/ftinspect/panels/settingpanel.cpp: Add connections for `gammaSlider_`,
      `hintingCheckBox_`, `horizontalHintingCheckBox_`,
      `verticalHintingCheckBox_`, `blueZoneHintingCheckBox_` and
      `segmentDrawingCheckBox_`.
---
 src/ftinspect/panels/settingpanel.cpp | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/ftinspect/panels/settingpanel.cpp 
b/src/ftinspect/panels/settingpanel.cpp
index 6a6a59e..308a9e8 100644
--- a/src/ftinspect/panels/settingpanel.cpp
+++ b/src/ftinspect/panels/settingpanel.cpp
@@ -236,9 +236,6 @@ SettingPanel::syncSettings()
 void
 SettingPanel::createConnections()
 {
-  connect(hintingCheckBox_, &QCheckBox::clicked,
-          this, &SettingPanel::checkHinting);
-
   // use `qOverload` here to prevent ambiguity.
   connect(hintingModeComboBox_, 
           qOverload<int>(&QComboBox::currentIndexChanged),
@@ -250,7 +247,21 @@ SettingPanel::createConnections()
           qOverload<int>(&QComboBox::currentIndexChanged),
           this, &SettingPanel::checkLCDFilter);
 
-  // TODO: some connections are missing
+  connect(gammaSlider_, &QSlider::valueChanged,
+          this, &SettingPanel::repaintNeeded);
+  
+  connect(hintingCheckBox_, &QCheckBox::clicked,
+          this, &SettingPanel::checkHinting);
+
+  connect(horizontalHintingCheckBox_, &QCheckBox::clicked,
+          this, &SettingPanel::repaintNeeded);
+  connect(verticalHintingCheckBox_, &QCheckBox::clicked,
+          this, &SettingPanel::repaintNeeded);
+  connect(blueZoneHintingCheckBox_, &QCheckBox::clicked,
+          this, &SettingPanel::repaintNeeded);
+  connect(segmentDrawingCheckBox_, &QCheckBox::clicked,
+          this, &SettingPanel::repaintNeeded);
+
   connect(autoHintingCheckBox_, &QCheckBox::clicked,
           this, &SettingPanel::checkAutoHinting);
   connect(showBitmapCheckBox_, &QCheckBox::clicked,



reply via email to

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