FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Menu error on Mac using Wine
Posts: 476
Joined: Sat Feb 03, 2007 06:36 AM
Menu error on Mac using Wine
Posted: Thu Oct 02, 2025 08:42 PM
Hello everyone.
I have a system installed on Linux with Wine, and it works fine.
Now, a client installed it on a Mac with Wine as well, and it already works, in part, since it asks for login and then displays the main screen with its menu, but when trying to view any menu option, it only shows a gray bar and the submenu options are not visible, as seen in this image:



This is part of the code where I define the menu:
If oApp:lLinux
MENU oMenu
Else
DEFINE FONT oFontMenu NAME cFont SIZE 0, -12
MENU oMenu 2015 COLORMENU CLR_WHITE,CLR_BLACK FONT oFontMenu HEIGHT 1.96
End

MENUITEM "&Files"
MENU

MENUITEM "&Users..." ;
ACTION SystemUsers( oApp:oSemWnd )

SEPARATOR

MENUITEM "&Companies..."
MENU
MENUITEM FWString( "Maintenance") ;
ACTION CompanyCategory( oApp:oSemWnd )
SEPARATOR
MENUITEM "Legal Documents" ;
ACTION CompanyLegalDocuments()

ENDMENU

MENUITEM "&Agencies..." ;
ACTION Cata01( oApp:oSemWnd )
SEPARATOR

MENUITEM "&Command Line" ACTION CommandLine()

SEPARATOR
MENUITEM "&Backups"
MENU
MENUITEM "Create &Backup..." ACTION TsBackup()
MENUITEM "&Restore Backup..." ACTION TsRestore()

ENDMENU
....
When the system is configured for Linux, the variable oApp:lLinux == .t. So the menu is simply defined as:
MENU oMenu

At least it works fine on Linux, but now it doesn't on Mac.

Has anyone been able to get a system working on a Mac with Wine?

Best regards.

Carlos Sincuir
Posts: 1515
Joined: Thu Oct 30, 2008 02:37 PM
Re: Menu error on Mac using Wine
Posted: Fri Oct 03, 2025 06:24 AM
Desde ChatGPT:


Ya veo lo que te pasa.

El problema no es tu código en sí, sino la forma en que Wine en macOS renderiza los menús con ciertas fuentes o estilos definidos.

En tu código, cuando no es Linux, estás usando:

DEFINE FONT oFontMenu NAME cFont SIZE 0, -12
MENU oMenu 2015 COLORMENU CLR_WHITE,CLR_BLACK FONT oFontMenu HEIGHT 1.96


Ese FONT y COLORMENU funcionan bien en Linux, pero en Wine sobre macOS los menús nativos no se pintan correctamente si les fuerzas tipografía o altura personalizada.
El síntoma típico es justo el que muestras: barra gris, sin opciones visibles.

Opciones que puedes probar:

Eliminar estilos personalizados en macOS/Wine
Haz que, si detectas que corres en macOS/Wine, uses el menú “simple”, igual que haces en Linux:

If oApp:lLinux .or. oApp:lMac
MENU oMenu
Else
// estilos para Windows
DEFINE FONT oFontMenu NAME cFont SIZE 0, -12
MENU oMenu 2015 COLORMENU CLR_WHITE,CLR_BLACK FONT oFontMenu HEIGHT 1.96
EndIf


Usar fuentes más genéricas
Wine en macOS a veces no encuentra las fuentes que pides. Intenta con "Arial", "Tahoma" o "Helvetica", y evita SIZE negativo. Ejemplo:

DEFINE FONT oFontMenu NAME "Arial" SIZE 10
MENU oMenu FONT oFontMenu


Forzar el renderizado clásico en Wine
Algunas versiones de Wine tienen problemas con COLORMENU. Intenta quitarlo:

MENU oMenu FONT oFontMenu


Detectar plataforma en tiempo de ejecución
Ya tienes oApp:lLinux. Puedes añadir algo como oApp:lMac si detectas que corre en Wine sobre macOS (por ejemplo, verificando HB_OS()).

👉 En resumen:
En Linux/Wine los estilos personalizados de menú suelen ir bien, pero en macOS/Wine casi siempre hay que usar la definición más básica (MENU oMenu) o fuentes muy simples.

¿Quieres que te prepare un #ifdef / #else con detección automática de plataforma (HB_OS()) para que el mismo código se adapte a Windows, Linux y macOS sin tener que cambiar manualmente oApp:lLinux?
Posts: 476
Joined: Sat Feb 03, 2007 06:36 AM
Re: Menu error on Mac using Wine
Posted: Fri Oct 03, 2025 05:08 PM

Hola Paco, gracias por la respuesta.

Voy a realizar las pruebas con lo que me indicas, y confirmo como me fue.

Saludos cordiales.

Carlos

Posts: 1144
Joined: Mon Feb 05, 2007 07:15 PM
Re: Menu error on Mac using Wine
Posted: Tue Feb 03, 2026 09:55 PM

y como te fue con MAC ? :roll:

Cesar Cortes Cruz

SysCtrl Software

Mexico



' Sin +- FWH es mejor "

Continue the discussion