Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2003-12

Win32 interface patch for menuitems

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Micha Nelissen
to Martin Smat: some time ago I sent a patch for resizing large menu icons but somebody removed a piece…
Martin Smat wrote 13 lines
Hi, some time ago I sent a patch for resizing large menu icons but somebody removed a piece of code which prevents resizing icons in the direction where the size is smaller (or equal) then max available size. Now when I have the icon with a size 2x18 pixels, it is resized into 13x13 pixels what makes the result not to nice. I think it is better when the resizing is done only with the directions they are larger then max size (from the previous example the result should be 2x13 pixels). The attached patch adds the removed code. I also slightly changed the way used for inserting menuitems into menu because changing menuitem icon causes Recreating handle (why? Is it needed for GTK?) and the new item was added at the end of the menu. Now the menu items are added with respect of their position in FItems list.

Applied, thanks.

Can you generate a unified diff next time? These are easier to read and for some reason, my patch doesn't know what file to patch:

"missing header for context diff at line 4 of patch" "can't find file to patch at input line 4"

when using patch -p1 in the win32 directory.

Micha.

Reply by email

Martin Smat

Hi,
some time ago I sent a patch for resizing large menu icons but somebody removed a piece of code which prevents resizing icons in the direction where the size is smaller (or equal) then max available size. Now when I have the icon with a size 2x18 pixels, it is resized into 13x13 pixels what makes the result not to nice. I think it is better when the resizing is done only with the directions they are larger then max size (from the previous example the result should be 2x13 pixels). The attached patch adds the removed code. I also slightly changed the way used for inserting menuitems into menu because changing menuitem icon causes Recreating handle (why? Is it needed for GTK?) and the new item was added at the end of the menu. Now the menu items are added with respect of their position in FItems list.

Martin Smat.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: zip00051.zip
Type: application/octet-stream
Size: 711 bytes
Desc: "menupatch.zip"
Url : http://localhost/pipermail/lazarus/attachments/20031229/86759d2f/zip00051.obj

Reply by email