Dear all,

I returned to the development of the Qt5 version.
Please find a list of problems that I encountered attached.
Any help would be appreciated.

Best wishes, --Joris

--------------------------------------------------------------------------

Color problems
==============

The most annoying problem with the Qt5 version under MacOS is that the colors 
of various widget elements are incorrect. This problem is most important when 
using the “Dark mode”.
It is fairly difficult to understand for me how these things work precisely in 
Qt and in the implementation by Max and Miguel, so help here would be welcome.
It would probably be best to abstract things a bit and to introduce a routine

QPalette tm_palette ();

for obtaining the TeXmacs color palette and consistently use this for all 
widgets. In order to make things customizable, we might also introduce an 
enumeration

enum gui_color { GUI_DARK, GUI_LIGHT, …};

with the TeXmacs counterparts for QPalette::Dark, QPalette::Light, etc. We also 
need the corresponding converters

color as_color (gui_color col);
QColor as_qcolor (gui_color col);

and maybe an initialization routine

init_gui_colors ();

that could read some of the values from Qt defaults (which could be different 
in light and dark mode) or from the user preferences.
Here follow some specific problems for the current implementation (MacOS 
10.14.6):
•  (dark mode) background too dark for wait widget.
•  (dark mode) font browser: selected backgrounds are too dark (by the way, 
they are grey instead of blue, but become blue when one clicks on them, before 
returning to grey . . . ) and so are the borders of the TeXmacs-output widget.
•  (dark mode) Insert→Session→Other ↝ very dark background for widget.
•  (dark mode) color menus on toolbars ↝ very dark background for widget.
•  (dark mode) Help→Search→Source code ↝ very dark background for widget.
•  When selecting “non native menubar” in Preferences→Other (SVN version of 
TeXmacs), the color of the menu bar is ugly (too light).
•  (dark mode) When pressing an icon on the toolbars, the pressed color is too 
dark.


Other problems
==============

•  Document→Colors→Background: the colored entries do not work; they do work in 
the pulldown menus for colors via the toolbars.
•  In the top-level menu for an empty document, click on Tools→Macros and note 
that Create context macro and Create table macro are greyed out. Now don't 
release the mouse button, click on Tools→Keyboard, and then go back to 
Tools→Macros; at this point, Create context macro and Create table macro are no 
longer greyed out.
•  Open a pulldown menu on one of the toolbars. Then click elsewhere on the 
toolbars; the pulldown menu icon remains highlighted until you hover the mouse 
over it.
•  The svg extension is not added to the list of supported formats when 
browsing image files. But SVG images do work (when changing the filter to *.*).
•  I could not manage to make the resize the toolbars in an appropriate way. By 
default, the icons and the fonts are a bit too small, but the retina versions 
are way too large. Note that the SVG versions of the icons seem to work in Qt5, 
but I still did not manage to get them at arbitrary sizes.
•  Denis (Raux) and Jean-Marc (Notin) managed to compile TeXmacs for ARM (an 
Apple M1 based Mac Mini), using Qt 5.12. The native Mac menu again seems to 
trigger a lot of segfaults, especially when opening documentation using the 
Help menu. This problem disappears when using the non-native menubars 
(Preferences→Other, SVN version of TeXmacs).
<TeXmacs|2.1>

<style|<tuple|tmdoc|pagella-font>>

<\body>
  <subsection*|Color problems>

  The most annoying problem with the <name|Qt5> version under <name|MacOS> is
  that the colors of various widget elements are incorrect. This problem is
  most important when using the \PDark mode\Q.

  It is fairly difficult to understand for me how these things work precisely
  in <name|Qt> and in the implementation by Max and Miguel, so help here
  would be welcome.

  It would probably be best to abstract things a bit and to introduce a
  routine

  <\cpp-code>
    QPalette tm_palette ();
  </cpp-code>

  for obtaining the <TeXmacs> color palette and consistently use this for all
  widgets. In order to make things customizable, we might also introduce an
  enumeration

  <\cpp-code>
    enum gui_color { GUI_DARK, GUI_LIGHT, ...};
  </cpp-code>

  with the <TeXmacs> counterparts for <cpp|QPalette::Dark>,
  <cpp|QPalette::Light>, etc. We also need the corresponding converters

  <\cpp-code>
    color as_color (gui_color col);

    QColor as_qcolor (gui_color col);
  </cpp-code>

  and maybe an initialization routine

  <\cpp-code>
    init_gui_colors ();
  </cpp-code>

  that could read some of the values from <name|Qt> defaults (which could be
  different in light and dark mode) or from the user preferences.

  Here follow some specific problems for the current implementation
  (<name|MacOS> 10.14.6):

  <\itemize>
    <item>(dark mode) background too dark for wait widget.

    <item>(dark mode) font browser: selected backgrounds are too dark (by the
    way, they are grey instead of blue, but become blue when one clicks on
    them, before returning to grey<text-dots>) and so are the borders of the
    <TeXmacs>-output widget.

    <item>(dark mode) <menu|Insert|Session|Other> <math|\<rightsquigarrow\>>
    very dark background for widget.

    <item>(dark mode) color menus on toolbars <math|\<rightsquigarrow\>> very
    dark background for widget.

    <item>(dark mode) <menu|Help|Search|Source code>
    <math|\<rightsquigarrow\>> very dark background for widget.

    <item>When selecting \Pnon native menubar\Q in <menu|Preferences|Other>
    (SVN version of <TeXmacs>), the color of the menu bar is ugly (too
    light).

    <item>(dark mode) When pressing an icon on the toolbars, the pressed
    color is too dark.
  </itemize>

  <subsection*|Other problems>

  <\itemize>
    <item><menu|Document|Colors|Background>: the colored entries do not work;
    they do work in the pulldown menus for colors <em|via> the toolbars.

    <item>In the top-level menu for an empty document, click on
    <menu|Tools|Macros> and note that <menu|Create context macro> and
    <menu|Create table macro> are greyed out. Now don't release the mouse
    button, click on <menu|Tools|Keyboard>, and then go back to
    <menu|Tools|Macros>; at this point, <menu|Create context macro> and
    <menu|Create table macro> are no longer greyed out.

    <item>Open a pulldown menu on one of the toolbars. Then click elsewhere
    on the toolbars; the pulldown menu icon remains highlighted until you
    hover the mouse over it.

    <item>The <verbatim|svg> extension is not added to the list of supported
    formats when browsing image files. But <name|SVG> images do work (when
    changing the filter to <verbatim|*.*>).

    <item>I could not manage to make the resize the toolbars in an
    appropriate way. By default, the icons and the fonts are a bit too small,
    but the retina versions are way too large. Note that the SVG versions of
    the icons seem to work in <name|Qt5>, but I still did not manage to get
    them at arbitrary sizes.

    <item>Denis (Raux) and Jean-Marc (Notin) managed to compile <TeXmacs> for
    ARM (an <name|Apple><nbsp>M1 based <name|Mac> <name|Mini>), using
    <name|Qt> 5.12. The native <name|Mac> menu again seems to trigger a lot
    of segfaults, especially when opening documentation using the <menu|Help>
    menu. This problem disappears when using the non-native menubars
    (<menu|Preferences|Other>, SVN version of<nbsp><TeXmacs>).
  </itemize>
</body>

<\initial>
  <\collection>
    <associate|math-font|math-pagella>
    <associate|page-medium|papyrus>
  </collection>
</initial>
_______________________________________________
Texmacs-dev mailing list
Texmacs-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/texmacs-dev

Reply via email to