Stop KivyMD Bottom Navigation Scaling with Window - python

I'm curious if it's at all possible to have the icons in MDBottomNavigation not scale with the window of the application? I would like it to act almost the same as DaVinci Resolve if anyone has used that program. Where the icons are in a fixed position and size regardless of the window size. Any ideas would be appreciated.
For reference, I'm using a .kv file not just writing everything in python.

Related

Kivy window size for mobile

I am coding kivy app on PC. At the end, I will convert it to .apk on my android phone (redmi note 9 pro). Which window size should I choose? It will be easier to code with this specific window size (add buttons and text on specific place).
And how to do it. Because I heard that using window.size is not good/not working.
Thanks
It's usually a better idea not to code for a specific window size, but to code the gui in such a way that regardless of the window size it tries to do something sensible. For instance, your app might have a navigation bar at the top that is always 40dp high, then the rest of the app is taken up by something else that grows to fill all the available space.
You can code the whole gui to a fixed size if you want of course, but it probably isn't the best solution.

QTableView not resizing when resizing main window

I've got a GUI in PyQt that does the following:
The main window is a grid layout (2 columns and 3 rows). This is the scheme (soory I can't post images yet):
Now, when resizing the Main Window I'd like the QTableView widgets to be resized. However, it happens otherwise:
And the tables stay almost fixed in size (but every size-fixing property is set not to fix anything), they just expand for about 50 pĂ­xels. I've tried changing the main layout to a horizontal layout and then putting vertical layouts there but no change. I'm designing the GUI with the QtDesigner as I have no clue on how to doing it by hand-writing the code, and I need to export it to python.
What's the property determining which layout gets expanded and which one not?
I fixed it! As there were some LineEdits on the left side, they had to expand too. Setting its expanding policy to "fixed" or setting a maximum fixed it.
Thanks everybody for the help and dont worry, i'm going to learn to handwrite Qt GUIs soon.

pygtk window moves when resized

Setup:
OS: Ubuntu Precise (12.04) amd64
Python: 2.7.3
GTK: 2.24.0
WindowManager: metacity and FVWM2 both exhibit the same behavior
I have a small pygtk app that contains (among other widgets) a treeview. The window has resizable=False so as the treeview is expanded/collapsed, the window automatically resizes to fit the content. This all works just fine.
The problem is that when the window resizes, it stays centered on where it was. I want the top-left corner of the window to stay in the same spot when the window resizes.
I've found that calling parse_geometry() with a +x+y position will induce the desired behavior. But that's not always an option. In the typical case, I want the window to open where the mouse is, not in a fixed location.
I suspect I need to set gtk.gdk.HINT_USER_POS, but as best I can tell, pygtk's version of set_geometry_hints() doesn't allow me to pass GdkWindowHints like the C and Perl interfaces do.
How can I make the window's top-left corner stay still as the contents cause the window to change size?
Update:
Since parse_geometry() sets the bit for me, just before gtk.main(), I call
gobject.timeout_add(500, self.fix_window)
The callback is:
def fix_window(self):
self.window.parse_geometry("+%d+%d" % self.window.get_position())
While this works, it's ugly so I'd still appreciate a better alternative.

highlighting a window in GNOME's window list

In order to indicate activity, some applications (e.g. Pidgin) highlight their entry in GNOME's Window List panel widget (e.g. via bold font or flashing color). This indication is reset automatically when the window is activated.
I have a terminal application for which I would like to achieve the same thing (preferably via Perl, but Python would work too) - but I have no idea where to start. I imagine I'd first have to find the terminal window (based on window title) and then trigger some kind of GTK action.
Any help would be greatly appreciated!
In a GTK application, use gtk_window_set_urgency_hint(). If you have a terminal application, you can't really do that - with libwnck you can get information about other application's windows, but as far as I know you can't get a GtkWindow pointer to another application's window.
May I suggest using the terminal beep? Of course this isn't a sure way to attract the user's attention, but some terminals are able to flash the title bar instead of beeping, or such things.
I'm not really into GTK programming, but as far as i know you want to set an "URGENT"-Flag for the Window which should be highlighted. Maybe this will get you any further. :)

don't show on panel

I am trying to write a simple aplication (a continuously changing label on a window on the upper left side of the screen) and I don't want it to be seen on panel but only on system tray.Because it will run for a long time. How can I do that? Thanks.
PS: I am using python and pyqt on Linux. I tried SplashScreen but when I clicked on the window it disapears. I have a contexmenu on the window, so I must click on it.!
http://www.qtcentre.org/attachment.php?attachmentid=4686&d=1274802065
I found the solution. I set the window flag as "Qt.Popup". Now there in no window on the panel.

Categories

Resources