diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-08-21 08:12:32 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-08-21 08:12:32 +0000 |
commit | c13506c5af711ab050a1e3d78f815fb754ada299 (patch) | |
tree | 76f9a25ae8020f03aba6409b5b5b7d3e2de28288 | |
parent | 310ce32804d88a1813a2455465b4e2c49039152c (diff) | |
download | fpGUI-c13506c5af711ab050a1e3d78f815fb754ada299.tar.xz |
* Fixed a minor memory leak in fpgApplication. We still have quite a few
more to fix in the future.
* Change menu accelarator key painting from a Bold style to the more
traditional Underline style.
* Fixed a minor bug in the Canvas.DrawString with Underline style enabled.
-rw-r--r-- | src/corelib/fpgfx.pas | 3 | ||||
-rw-r--r-- | src/corelib/gfxbase.pas | 2 | ||||
-rw-r--r-- | src/gui/gui_menu.pas | 11 |
3 files changed, 11 insertions, 5 deletions
diff --git a/src/corelib/fpgfx.pas b/src/corelib/fpgfx.pas index 69396e58..a7c5fd8e 100644 --- a/src/corelib/fpgfx.pas +++ b/src/corelib/fpgfx.pas @@ -597,6 +597,7 @@ begin fpgImages.Free; FFontResList.Free; + FDefaultFont.Free; inherited Destroy; end; @@ -855,7 +856,7 @@ begin fpgSetNamedFont('Grid', 'Arial-9'); fpgSetNamedFont('GridHeader', 'Arial-9:bold'); fpgSetNamedFont('Menu', FPG_DEFAULT_FONT_DESC); - fpgSetNamedFont('MenuAccel', FPG_DEFAULT_FONT_DESC + ':bold'); + fpgSetNamedFont('MenuAccel', FPG_DEFAULT_FONT_DESC + ':underline'); fpgSetNamedFont('MenuDisabled', FPG_DEFAULT_FONT_DESC); {$Note Refactor this so under Windows it can detect the system colors instead. diff --git a/src/corelib/gfxbase.pas b/src/corelib/gfxbase.pas index 9b3f5b47..7d6b34b0 100644 --- a/src/corelib/gfxbase.pas +++ b/src/corelib/gfxbase.pas @@ -878,7 +878,7 @@ begin DoSetLineStyle(1, lsSolid); DoSetColor(TextColor); - DoDrawLine(x, Font.Height-underline, x+Font.TextWidth(txt), Font.Height-underline); + DoDrawLine(x, y+Font.Height-underline, x+Font.TextWidth(txt), y+Font.Height-underline); end; end; diff --git a/src/gui/gui_menu.pas b/src/gui/gui_menu.pas index 0a1818c3..e625f81c 100644 --- a/src/gui/gui_menu.pas +++ b/src/gui/gui_menu.pas @@ -3,7 +3,10 @@ unit gui_menu; {$mode objfpc}{$H+} { - Still under construction!!!!! + TODO: + * Refactor the HotKey painting code into Canvas.DrawString so that other + widgets like TfpgButton could also use it.gui_menu + * Global keyboard activation of menu items are still missing. } interface @@ -441,7 +444,8 @@ begin end else begin - Canvas.SetColor(clInactiveSel); +// Canvas.SetColor(clInactiveSel); + Canvas.SetColor(clShadow1); Canvas.SetTextColor(clInactiveSelText); end; end @@ -914,7 +918,8 @@ begin end else begin - Canvas.SetColor(clInactiveSel); +// Canvas.SetColor(clInactiveSel); + Canvas.SetColor(clShadow1); Canvas.SetTextColor(clInactiveSelText); end; end |