Menu

#594 OSX Appearance: 1. Font size, 2. Menu disappears

None
closed
nobody
None
1
2013-06-02
2012-08-19
spieb
No

In OSX i set the font size in the appearance options to 9pt (where it says "ready" and "normal" mode ). However if i change the virtual desktop and then return, the font size is ignored and set to the standard value. I guess the window is redraw whenever i change the desktop.
Sometimes also the menu bar dissappears, but i haven't found a way to reproduce this, so i'll keep track of that.

Related

Bugs: #594

Discussion

1 2 3 > >> (Page 1 of 3)
  • Tim Hoffmann

    Tim Hoffmann - 2012-08-23

    This setting directly sets QApplication::setFont()
    Don't know, why that should get lost, when changing the desktop. Maybe a Qt bug? Though, I didn't find anything about it.

    Does someone know: Is there a way to get notified, that the desktop changes? Then we could implement a workaround and set the font anew.

     
  • spieb

    spieb - 2012-08-23

    Two things i found out:
    1. about the font size: after search the internet i'm pretty sure it is a (pretty old) qt bug. I found a user experiencing the same problem here:
    https://bugreports.qt-project.org/browse/QTBUG-5469
    just as that user I experience the same problem if I start texstudio from terminal.
    May this is also the same bug, nevertheless in my case the default font is way to big:
    http://www.qtcentre.org/threads/47765-Font-size-issue-on-Mac-OS-X
    Is there a way to change the system default for qt apps?

    1. about the menu bar: the problem can be reproduced by undocking the embedded viewer and than embedding it again
     
  • Tim Hoffmann

    Tim Hoffmann - 2012-08-23

    Font changes:
    I've added debug output for font changes on OSX. Please try rev. 3204 and report, if the changing of desktop triggers the debug messages.

     
  • spieb

    spieb - 2012-08-23

    About the font bug:
    Same problem here:
    http://lists.trolltech.com/qt-interest/2004-12/thread00778-0.html

    I also tried messing around with ./.qt/qtrc and setting
    font=Lucida Grande,10,-1,0,50,0,0,0,0,0
    but had no luck with that. Then I read that for qt4 the config file is ./.config/Trolltech.conf which didn't exist on my system, so i created that a tried again, but again no luck :(

     
  • spieb

    spieb - 2012-08-23

    Ok, just compiled 3204. Sorry for the dumb question, but where do i find the debug output?

     
  • Tim Hoffmann

    Tim Hoffmann - 2012-08-23

    If you start from a console, debug output is there.
    Alternatively, if you use QtCreator, debug output is in the "Application Output" panel :).

     
  • spieb

    spieb - 2012-08-23

    Ok, it says fontChange just after the start from console and if I change the font size in the preferences, but not if I switch the desktop

     
  • Tim Hoffmann

    Tim Hoffmann - 2012-08-23

    ok, I added a bit more debug output.

    The basic idea for a workaround is that we need to find an event, that is triggered, when you change the desktop. Then we can restore the font.

    QEvent::FontChange didn't work.
    Now trying:
    QEvent::ActivationChange
    QEvent::ApplicationFontChange

    maybe one of these will already do. If not, do you think, you could manage to find out yourself, which event(s) are triggered? This remote testing is a bit cumbersome.

     
  • spieb

    spieb - 2012-08-23

    QEvent::ActivationChange is trigger when i change the desktop

     
  • Tim Hoffmann

    Tim Hoffmann - 2012-08-23

    good. new version with debug output and may already a fix

     
  • spieb

    spieb - 2012-08-23

    ok, new debug output is this:
    $ ./TeXstudio
    Application Font: "Lucida Grande" 10
    Config Font : "Lucida Grande" 10
    Application Font: "Lucida Grande" 10
    Config Font : "Lucida Grande" 10

    unfortunately is doesnt fix it

     
  • Tim Hoffmann

    Tim Hoffmann - 2012-08-23

    hm. When the font is wrong after changing the desktop, can you restore it by changing in the config menu?

     
  • spieb

    spieb - 2012-08-24

    Yes, restoring it in the config menu works

     
  • Tim Hoffmann

    Tim Hoffmann - 2012-08-24

    New code to test (rev. 3212). Please try
    a) changing the desktop: what is the output? is it fixed now
    b) if not change the font back using the conig menu. What is the output?

     
  • spieb

    spieb - 2012-08-24

    ok, i think i fixed it, im in a hurry, post it later....

     
  • spieb

    spieb - 2012-08-25

    your workaround is unfortunately triggered to early, thus the application font was reset when the window loses focus and than when it gained focus after switching the desktop the problem was there again. However this worked for me:
    just add these lines in the texmaker.cpp main routine

    ifdef Q_OS_MAC

    QApplication::setDesktopSettingsAware(false);

    endif

    i don't know if that has any unwanted side effects, but i couldnt discover any yet.
    maybe you know a better place to put these lines, i put them in the beginning of "Texmaker::Texmaker(QWidget *parent, Qt::WFlags flags)"

    also i would suggest to change the texstudio.pro slightly, because otherwise it doesnt compile on current macs (x86 -> x86_64):

    CONFIG += link_prl \ x86_64

     
  • spieb

    spieb - 2012-08-25

    OK but the menu bar problem still exists. However I have no idea, what is causing this. This is whats happening:
    1. open texstudio, then open internal pdf viewer (appears not embedded)
    2. embed viewer -> everything works fine (pic 1)
    3. undock viewer -> the menu bar of the undocked viewer appears (pic 2)
    4. embed viewer again, the menu bar disappears (pic 3)
    ( 5. undock viewer again, the menu bar of the viewer appears, but the one of the main application is still lost)

     
  • spieb

    spieb - 2012-08-25

    pic1

     
  • spieb

    spieb - 2012-08-25

    pic2

     
  • spieb

    spieb - 2012-08-25

    pic3

     
  • Tim Hoffmann

    Tim Hoffmann - 2012-08-25

    Font issue:
    I applied setDesktopSettingsAware(false)
    Please continue to watch out for unwanted side effects. Possible ones include Non-native dialog boxes / controls, wrong or missing animations, non-native standard icons.

    Menubar:
    No real idea, why that happens. When docking/undocking we don't do any explicit changes on the menubar. However we'e set a custom menubar. Maybe Qt on OSX loses it at some point. I deactivated it in the SVN, so the default menubar class is used on OXS. Please check, if the problem still persists.

     
  • spieb

    spieb - 2012-08-25

    As far as i can tell the dialog boxes and icons are all the same.
    The menubar is still broken, debug output is this:

    Object::connect: No such signal QMenuBar::doubleClicked() in texmaker.cpp:932
    Object::connect: (receiver name: 'main/view/fullscreenmode')

     
  • Robert

    Robert - 2012-08-25

    Chris. I noticed that the menu bar disappears when I go to options and then configure texstudio. Perhaps what you are seeing is connected to this?

     
  • spieb

    spieb - 2012-08-28

    Yeah, it might be the same thing, since its a different window. But in this case it could be intended qt behavior, since the menu is not supposed to be accessible if the config window is opened. Do you get the same menu bug error as i do? I get this on both my mac systems.

     
1 2 3 > >> (Page 1 of 3)

Log in to post a comment.