Current Server Time: 23:44 (Central Europe)

#apertus IRC Channel Logs

2020/05/16

Timezone: UTC


01:33
BAndiT1983
changed nick to: BAndiT1983|away
03:54
comradekingu
left the channel
03:59
comradekingu
joined the channel
05:43
Bertl_oO
off to bed now ... have a good one everyone!
05:43
Bertl_oO
changed nick to: Bertl_zZ
07:21
RexOrCine
left the channel
07:30
RexOrCine
joined the channel
08:00
BAndiT1983|away
changed nick to: BAndiT1983
09:19
BAndiT1983
changed nick to: BAndiT1983|away
10:22
BAndiT1983|away
changed nick to: BAndiT1983
10:28
BAndiT1983
hi metal_dent[m], how is it going?
11:43
RexOrCine
left the channel
11:43
RexOrCine
joined the channel
11:44
metal_dent[m]
going good!
11:44
metal_dent[m]
btw Bertl wanted to discuss something about the image conversion yesterday but I guess he forgot
11:46
BAndiT1983
that's good
11:46
BAndiT1983
have checked the logs, as i was not at home yesterday while the meeting was ongoing
11:46
BAndiT1983
he will surely tell you, when back again
12:24
Bertl_zZ
changed nick to: Bertl
12:24
Bertl
morning folks!
12:24
BAndiT1983
hi
12:28
illwieckz
left the channel
13:11
illwieckz
joined the channel
14:26
BAndiT1983
changed nick to: BAndiT1983|away
14:51
aombk2
left the channel
14:58
aombk
joined the channel
15:11
Bertl
off for now ... bbl
15:11
Bertl
changed nick to: Bertl_oO
18:04
panintended
Hi all
18:07
panintended
FYI, the visualizer build is broken - MenuSystem now expects a display in the constructor that it cannot find
18:09
panintended
sent a long message: < https://matrix.org/_matrix/media/r0/download/matrix.org/AScPCzCODqwafmDdqDCCWITf >
18:10
panintended
where IDisplay is an interface that displays implement, including a dummy one that the visualizer can use
18:11
panintended
I can open a task and get on it, let me know
18:38
BAndiT1983|away
changed nick to: BAndiT1983
18:39
BAndiT1983
hi panintended, there shouldn't be a display at all, but we have talked with se6ast1an about it already, as later the firmware won't know the display and only send commands regarding it to bootloader
18:40
BAndiT1983
this display argument has to be replaced by settings object, which should be the central point of holding all the properties and settings
18:46
se6ast1an
about to push, yes
18:46
se6ast1an
I undid the display parameter additions
18:49
se6ast1an
pushed
18:49
BAndiT1983
will check the problems now
18:50
metal_dent[m]
it's working now \o/
18:50
se6ast1an
thanks!
18:56
BAndiT1983
se6ast1an: cause you have a static variable, this is not going to work, as it does not belong to class, just remove static
18:56
BAndiT1983
as you have the DB object in the main, it will be passed to other modules, they can use it and it exists one time
18:57
metal_dent[m]
BAndiT1983: for the ImageButton size I was thinking that the button drawn is basically defined by the rectangle around the image so I think size of the rectangle should be adjusted but the image size should be taken from the header files, what do you think?
18:59
BAndiT1983
ehm, wasn't it the plan that the button size is defined freely and icon is drawn 1:1 to the icon data?
19:00
metal_dent[m]
yes, that's what I'm saying
19:02
metal_dent[m]
here the button is drawn -> https://github.com/MetalDent/AXIOM-Remote/blob/imagebutton-position/Firmware/UI/Widgets/ImageButton.h#L43-L44
19:03
BAndiT1983
sorry, but i still don't see a flexible button and am asking for it since days
19:03
metal_dent[m]
so DrawIcon draws the image and DrawFillRoundRectangle draws the actual button so instead of fixing its size 30x30 we need to define it freely
19:04
se6ast1an
ahh, BAndiT1983 you are a genius!
19:04
se6ast1an
works
19:04
se6ast1an
or at least: "compiles" :)
19:04
metal_dent[m]
> sorry, but i still don't see a flexible button and am asking for it since days
19:04
metal_dent[m]
it's the same old code
19:04
BAndiT1983
se6ast1an: nope, just experience with this darn errors a lot, happens to me quite often if i forget to maintain same object ;)
19:05
BAndiT1983
metal_dent[m]: ok, my understanding was that you've already reworked it, as it takes only a couple of minutes to do
19:08
preetimenghwani[
Hello Bertl_oO
19:08
se6ast1an
metal_dent[m]: can you tell me what the member variables/fields are that IWidget has?
19:10
metal_dent[m]
_x, _y, _width, _height
19:10
se6ast1an
correct
19:10
se6ast1an
these fields are set by constructor and SetDimensions() function right?
19:11
metal_dent[m]
yes
19:11
se6ast1an
if you look at the class IButton, which class does it inherit memberr variables / methods from?
19:12
metal_dent[m]
IWidget
19:12
se6ast1an
very good
19:12
se6ast1an
and what class does your class ImageButton inherit from?
19:12
metal_dent[m]
IButton
19:13
se6ast1an
indeed!
19:13
se6ast1an
so your ImageButton class already has member variables for _x, _y, _width, _height
19:13
se6ast1an
and in your draw() function
19:14
se6ast1an
what are the parameters the painter->DrawFillRoundRectangle() takes?
19:14
se6ast1an
*function
19:14
metal_dent[m]
position, size, radius and bgcolor
19:15
se6ast1an
where position and size are which variables?
19:15
metal_dent[m]
x, y, width, height
19:15
se6ast1an
perfect
19:16
se6ast1an
your code currently uses the following parameters:
19:16
se6ast1an
painter->DrawFillRoundRectangle(_x - 2, _y + 20, 30, 30, _cornerRadius, _currentBackgroundColor);
19:16
se6ast1an
so how would you make that line listen to the buttons inherited x,y,width and height?
19:17
metal_dent[m]
painter->DrawFillRoundRectangle(_x, _y, _width, _height, _cornerRadius, _currentBackgroundColor);
19:17
se6ast1an
excellent!
19:18
se6ast1an
and the next line is a bit more tricky as you want to draw the icon in the center of the area that the round rectangle fills
19:18
se6ast1an
currently its painter->DrawIcon(_image->Data, _x + 1, _y + 23, _image->Width, _image->Height, _currentImageColor);
19:19
se6ast1an
how would you calculate the center x and y coordinates?
19:20
metal_dent[m]
by dividing height and width by 2
19:20
se6ast1an
almost, keep in mind that the icons origin is not in its center
19:21
metal_dent[m]
yes, will have to adjust a bit (like it's done in the PushButton)
19:21
se6ast1an
how will you adjust it a bit
19:22
se6ast1an
keep in mind you have the icons dimensions already at hand ( _image->Width, _image->Height)
19:23
se6ast1an
where is the LCDs origin (0, 0) coordinates?
19:24
metal_dent[m]
top left
19:25
se6ast1an
correct, and the icons origin ?
19:26
metal_dent[m]
_x, _y
19:28
se6ast1an
no I mean which corner of the icon
19:30
metal_dent[m]
top left..?
19:30
se6ast1an
correct!
19:31
se6ast1an
so how far is the distance from the top left corner of the icon to its center?
19:31
se6ast1an
if you have the variables available mentioned above
19:36
se6ast1an
metal_dent[m]: I need to leave very soon, would love to finish this beforehand
19:36
se6ast1an
talk to us :)
19:37
metal_dent[m]
I'm not sure, am trying out in the code
19:37
se6ast1an
dont code anything now
19:37
se6ast1an
stay with us here
19:38
se6ast1an
lets say your icon is a rectangle, you have _image->Data, _image->Width, _image->Height
19:38
se6ast1an
you know the origin is at the top left corner
19:40
se6ast1an
lets say the icon gets drawn at X=100
19:40
se6ast1an
Y=50
19:40
se6ast1an
image or icon width = 50
19:40
se6ast1an
and image/icon height = 60
19:41
se6ast1an
what is the top right corner coordinate of the icon/image?
19:41
metal_dent[m]
rectangle width by 2 - image width by 2 ...?
19:41
se6ast1an
correct!
19:42
se6ast1an
if you mean "divided by 2" ?
19:42
metal_dent[m]
yes
19:42
se6ast1an
great
19:42
se6ast1an
you have a solution for a new PR now
19:44
se6ast1an
off for now, bbl
19:44
metal_dent[m]
actually no, can't make the size of rectangle as _width and _height
19:46
BAndiT1983
why?
19:46
BAndiT1983
am cooking, so you should excuse my periodic absence
19:57
metal_dent[m]
alright there's no problem with that, sorry
19:58
metal_dent[m]
there's some other problem
20:01
metal_dent[m]
SetButton in ButtonBar needs to be changed acc to the button position whether it's in the Top / BottonBar or Left / RightBar
20:10
BAndiT1983
elaborate please
20:18
metal_dent[m]
I mean this -> https://github.com/MetalDent/AXIOM-Remote/blob/imagebutton-position/Firmware/UI/Widgets/ButtonBar.h#L49-L57
20:19
metal_dent[m]
only works if the left, center & right buttons are situated in the top or bottom bars not if the buttons lie in the left or right bars (i.e. top, center & bottom button)
20:23
metal_dent[m]
otherwise it looks like this -> https://pasteboard.co/J8GaUFu.png
20:26
BAndiT1983
it needs adjustments of course, the button bar should recognize automatically its orientation, according to width or height, whatever is bigger
20:27
metal_dent[m]
yes, can I try to add that part?
20:29
BAndiT1983
yes, of course
20:49
metal_dent[m]
done!
20:52
se6ast1an
thanks!
21:16
metal_dent[m]
off to bed now.... good night!
21:16
BAndiT1983
good night
21:48
BAndiT1983
changed nick to: BAndiT1983|away
22:14
megora
joined the channel
22:20
megora
left the channel
22:43
BAndiT1983|away
changed nick to: BAndiT1983
00:03
BAndiT1983
changed nick to: BAndiT1983|away