]> git.lyx.org Git - features.git/commitdiff
Use CategorizedCombo for font selection
authorJuergen Spitzmueller <spitz@lyx.org>
Thu, 23 Apr 2020 10:43:38 +0000 (12:43 +0200)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 18 Jun 2020 13:48:57 +0000 (15:48 +0200)
We do not have categories, but this gives as a nice filter functionality
for long (non-TeX) font lists for free.

See #11849

src/frontends/qt/ui/FontUi.ui

index d2858b00633e3e426c2adbdf21d69ce47b2d5858..0063437a4880d5ba2e856a8ac55795021a7af099 100644 (file)
@@ -7,7 +7,7 @@
     <x>0</x>
     <y>0</y>
     <width>568</width>
-    <height>557</height>
+    <height>565</height>
    </rect>
   </property>
   <property name="windowTitle">
      <item row="2" column="1">
       <layout class="QHBoxLayout" name="horizontalLayout_8">
        <item>
-        <widget class="QComboBox" name="fontsRomanCO">
+        <widget class="lyx::frontend::CategorizedCombo" name="fontsRomanCO">
          <property name="toolTip">
           <string>Select the roman (serif) typeface</string>
          </property>
      <item row="4" column="1">
       <layout class="QHBoxLayout" name="horizontalLayout_6">
        <item>
-        <widget class="QComboBox" name="fontsSansCO">
+        <widget class="lyx::frontend::CategorizedCombo" name="fontsSansCO">
          <property name="toolTip">
           <string>Select the Sans Serif (grotesque) typeface</string>
          </property>
      <item row="6" column="1">
       <layout class="QHBoxLayout" name="horizontalLayout_7">
        <item>
-        <widget class="QComboBox" name="fontsTypewriterCO">
+        <widget class="lyx::frontend::CategorizedCombo" name="fontsTypewriterCO">
          <property name="toolTip">
           <string>Select the typewriter (monospaced) typeface</string>
          </property>
   </layout>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
+ <customwidgets>
+  <customwidget>
+   <class>lyx::frontend::CategorizedCombo</class>
+   <extends>QComboBox</extends>
+   <header>CategorizedCombo.h</header>
+  </customwidget>
+ </customwidgets>
  <tabstops>
   <tabstop>osFontsCB</tabstop>
   <tabstop>fontsDefaultCO</tabstop>