On Thursday 17 November 2016 23:03:05 Krzysztof wrote:
> Hi Martin,
>
> Do you remember my issues with Intel HD Skylake 520 and bmo_graymask?
> Setting bmo_colormask fixed this issue on both graphics: HD 520 and old HD
> 4400.
>
> Few things changed form that time: I have now Linux Mint 18 KDE edition
> (instead of Kubuntu 16.04) and recently had big updates on mesa from
> official stable repo.
>
> Today tried set main form icon in my new app and implement tray icon.
> Noticed regressions between bmo_graymask and bmo_colormask. See attached
> video
>
> bmo_colormask:
> 1. Main form icon has icon but background has weird artifacts
See below.
> 2. Tray icon doesn't have transparent background but that is known since
> MSE doesn't have support for it.
> But sometimes background has different
> width when switching between colors
>
> bmo_graymask:
> 1. First of all, it is suprise that icons finally are showing at HD 520 at
> all (maybe messa updates have something to do with?)
Probably. :-)
> 2. Main form icon is not drawed but background's artifacts still appear
Works for me with attached files.
> 3. Tray icon after first timagelisttray.bitmap.init() has transparent
> background. How it is possible? :o
>
I don't know.
> BTW: I want to add customizable icon color in my app.
> Is timagelisttray.bitmap.init() correct way for do this? Or better clear
> imagelist and readd icons with glyphs.getcell(,)?
>
Because the glyph outline is in mask only, calling timagelist.bitmap.init() is
the most performant method.
> When creating this demo I noticed another issue with tray icon. Function
> below is from my old MSE app made on previous laptop. It is connected
> to ttraywidget.onresize event. I remember that onresize event was triggered
> twice, first with initial 50x50 and then with correct tray X window size
> (IIRC 26x26). Now it is called only once with 50x50 but icon
> is surprisingly drawed fine (rescaled?). Goal for this function was create
> tray icon fit exactly to X window size. As you can see in attached demo, I
> commented condition on <>50
>
It probably depends on the window-manager/desktop-environment how it handles
try icon windows. I fear you need to expect everything...
Martin
object mainfo: tmainfo
bounds_x = 986
bounds_y = 763
bounds_cx = 399
bounds_cy = 237
container.frame.localprops = []
container.frame.localprops1 = []
container.bounds = (
0
0
399
237
)
icon.options = [bmo_masked, bmo_graymask]
onloaded = LoadIcons
moduleclassname = 'tmainform'
object ticon1: ticon
bounds_x = 88
bounds_y = 48
imagelist = timagelist1
end
object tbutton1: tbutton
taborder = 1
bounds_x = 128
bounds_y = 32
bounds_cx = 66
bounds_cy = 44
state = [as_localimagelist]
imagelist = timagelist1
end
object tbutton2: tbutton
taborder = 2
bounds_x = 72
bounds_y = 128
bounds_cx = 50
bounds_cy = 20
state = [as_localcaption, as_localonexecute]
caption = 'black'
onexecute = ChangeColor
end
object tbutton3: tbutton
Tag = 1
taborder = 3
bounds_x = 136
bounds_y = 128
bounds_cx = 50
bounds_cy = 20
state = [as_localcaption, as_localonexecute]
caption = 'red'
onexecute = ChangeColor
end
object tbutton4: tbutton
Tag = 2
taborder = 4
bounds_x = 200
bounds_y = 128
bounds_cx = 50
bounds_cy = 20
state = [as_localcaption, as_localonexecute]
caption = 'blue'
onexecute = ChangeColor
end
object tbutton5: tbutton
Tag = 3
taborder = 5
bounds_x = 264
bounds_y = 128
bounds_cx = 50
bounds_cy = 20
state = [as_localcaption, as_localonexecute]
caption = 'green'
onexecute = ChangeColor
end
object ttraywidget1: ttraywidget
taborder = 6
bounds_x = 288
bounds_y = 64
bounds_cx = 50
bounds_cy = 50
onresize = InitTrayIcon
imagelist = timagelisttray
end
object tbutton6: tbutton
taborder = 7
bounds_x = 208
bounds_y = 48
bounds_cx = 50
bounds_cy = 20
state = [as_localimagelist]
imagelist = timagelist1
end
object timagelist1: timagelist
options = [bmo_masked, bmo_graymask]
left = 272
top = 32
end
object timagelisttray: timagelist
options = [bmo_masked, bmo_graymask]
left = 272
top = 4
end
end
unit main_mfm;
{$ifdef FPC}{$mode objfpc}{$h+}{$endif}
interface
implementation
uses
mseclasses,main;
const
objdata: record size: integer; data: array[0..1485] of byte end =
(size: 1486; data: (
84,80,70,48,7,116,109,97,105,110,102,111,6,109,97,105,110,102,111,8,
98,111,117,110,100,115,95,120,3,218,3,8,98,111,117,110,100,115,95,121,
3,251,2,9,98,111,117,110,100,115,95,99,120,3,143,1,9,98,111,117,
110,100,115,95,99,121,3,237,0,26,99,111,110,116,97,105,110,101,114,46,
102,114,97,109,101,46,108,111,99,97,108,112,114,111,112,115,11,0,27,99,