I have defined a custom class called ImageButton which is inherited from the Image and ButtonBehavior classes. Can I use those buttons in the action bar with distinct images for "normal" and "down" states of the button?
I expect you could do this with an ActionButton.
The buttons get displayed when the app window is maximized but they are not visible in the overflow area when the app window is resized (made small). I see only blank black boxes. Can you please help?
For a number of reasons I set a minimum window size in my apps. That may solve this issue. If you create a runnable example, I’ll take a look.
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/43e66764-5fae-482c-abd0-1ff386ef15f1%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.
Hard for me to see what is going on with out the images…
What I see is below.
The action bar changed behavior based on the size of the bar. As it gets small things will be stacked. Perhaps it would be best if you shared some images, and described how you would like it to work.
Small window
Stretched:
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/e19de471-6bba-4a19-bee3-9b068adbd6e1%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/e19de471-6bba-4a19-bee3-9b068adbd6e1%40googlegroups.com.
One simple thing to do is set the minimum window size, so icons remain visible.
from kivy.core.window import Window
In build:
…
Window.minimum_width = # your min width
Window.minimum_height = # your min height
This will set a minimum size for the window.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/449df7e9-a278-49c6-b5d7-c7a873673477%40googlegroups.com.
Looking at the docs:
It says:
For icon: Source image to use when the Button is part of the ActionBar. If the Button is in a group, the text will be preferred.
If you need to support the narrower layout, set the text for each ActionButton.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/449df7e9-a278-49c6-b5d7-c7a873673477%40googlegroups.com.
If I set the minimum window height and width, the app cannot be resized below the minimum width. But that would still not enable the button displays. Besides, I would like to use the app on mobile devices powered by Android and iOS.
I did try your suggestion with having text labels along with icons. That is working fine. But I intended to use images as buttons to enhance the end user experience in mobile devices.
I tried to tinker with an existing ImageButton class derived from the ButtonBehavior and Image classes. Then I created a derived class called CustomActionButton from ImageButton and ActionItem. The image icons are now getting displayed in both app view and overflow areas but the icon size and position are a bit messed up. I will be sharing the new code here. Kindly review the code and advise.
Will do. Glad your making progress!
From: Shoumik Das
Sent: Friday, May 8, 2020 8:30 AM
To: Kivy users support
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/ff9b1ea0-0588-4042-8d18-2e5dac254cf2%40googlegroups.com.
Will do. Glad your making progress!
From: Shoumik Das
Sent: Friday, May 8, 2020 8:30 AM
To: Kivy users support
Subject: RE: [kivy-users] Buttons not showing in ActionOverFlow area of Action Bar
Hi Eliott,
If I set the minimum window height and width, the app cannot be resized below the minimum width. But that would still not enable the button displays. Besides, I would like to use the app on mobile devices powered by Android and iOS.
I did try your suggestion with having text labels along with icons. That is working fine. But I intended to use images as buttons to enhance the end user experience in mobile devices.
I tried to tinker with an existing ImageButton class derived from the ButtonBehavior and Image classes. Then I created a derived class called CustomActionButton from ImageButton and ActionItem. The image icons are now getting displayed in both app view and overflow areas but the icon size and position are a bit messed up. I will be sharing the new code here. Kindly review the code and advise.
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.
Here are a few things to try.
You are setting the size_hint: None, None in CustomActionButton. Try removing that line.
There is an attribute called inside group, that looks like it indicates it the item is inside the group drop down or not. Could you use that knowledge to change the image size?
To provide more help I would need the art and an executable example.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/b724be1c-dace-4f68-82c0-353951532e90%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/b724be1c-dace-4f68-82c0-353951532e90%40googlegroups.com.
Congratulations… I just downloaded your zip file… so your timing is perfect.
To change the font everywhere re-define the label:
<Label>:
-font: ‘your-new-font’
The leading ‘-‘ re-defines the attribute.
From: Shoumik Das
Sent: Saturday, May 9, 2020 7:18 AM
To: Kivy users support
Subject: Re: [kivy-users] Buttons not showing in ActionOverFlow area of Action Bar
Eureka! I fixed it. 🙂
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/765f52ea-1a3e-4873-8149-4f491f7a9cc6%40googlegroups.com.
Yes. Typically all the text in the app is derived from label. So making this change will change all of the text. Give it a try.
From: Shoumik Das
Sent: Saturday, May 9, 2020 7:24 AM
To: Kivy users support
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/6a89daa0-6c43-4f8d-bc4a-539d60c02c32%40googlegroups.com.
Yes. Typically all the text in the app is derived from label. So making this change will change all of the text. Give it a try.
From: Shoumik Das
Sent: Saturday, May 9, 2020 7:24 AM
To: Kivy users support
Subject: RE: [kivy-users] Buttons not showing in ActionOverFlow area of Action Bar
Just a query. I understand that this will set the font for all Labels in my app. Will it also change the font in widgets which are not Labels? E.g: Title bar, body text, etc.?
--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-...@googlegroups.com.
😊
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/df9dd8a2-92bc-4586-b5fc-74402d8d8f74%40googlegroups.com.