ralf3u left a comment (geany/geany-plugins#1537) @b4n
>I'm not sure what you're trying to achieve, [...] My goal is that when pressing a shortcut the splitter will change its position (the position can be defined in a conf-document by users). Example: The position of the splitter is 500px. Let's imagine in a conf-document a user was setting 800 as value. So, when pressing the shortcut, then the position of the splitter will change from 500px to 800px. >[...] but you might also be interested in GtkPaned documentation. This is exactly what I was looking for. I'm not a software developer but I think `gtk_paned_set_position` is the value that I need. I found also https://docs.gtk.org/gtk3/method.Paned.set_position.html and https://docs.gtk.org/gtk4/method.Paned.set_position.html. And I found also the two following text in "AI Overview" by typing at google `gtk gtk_paned_set_position example`: `Maximum Position: To set the divider to the maximum possible position (effectively hiding the right/bottom pane), you can use a large integer value, such as 2147483647 (or G_MAXINT).` ``` // Set position: 150 pixels from the left gtk_paned_set_position(GTK_PANED(paned), 150); ``` That would mean to set the splitter in that way to let disappear the sidebar, then this would be the necessary code: ``` gtk_paned_set_position(GTK_PANED(paned), 2147483647); ``` That would mean to set the splitter in that way to let disappear the editor, then this would be the necessary code: ``` gtk_paned_set_position(GTK_PANED(paned), 0); ``` >[...] the "paned" position is in pixels from left edge of its left child [...] >So if you want to do percentage, you'll have to compute them with the whole >width. So, for me it sounds like that it is possible that in a conf-document one could note for example the number 30, what would mean 30% sidebar width (so, 70% editor width, so, 70% from the whole width). Thank you very much for your help. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/issues/1537#issuecomment-3896438170 You are receiving this because you are subscribed to this thread. Message ID: <geany/geany-plugins/issues/1537/[email protected]>
