GTK docking interfaces and more

Important information: Google announced that, from September 2026, Android devices will require ALL apps to be signed by Google, effectively leading to an iOS situation. Value your right to a computer that does what you want; do not tolerate this monopolistic practice! Contact me if you don't understand why it is bad. Click to learn more.

Dropping on button moves to the closest side

by roundabout, Friday, 14 March 2025, 08:44:40 (1741941880), pushed by roundabout, Friday, 14 March 2025, 08:44:42 (1741941882)

Author identity: vlad <vlad.muntoiu@gmail.com>

9381e349c6c1f38064fab8356daa30a9e485ea4e

gpanthera.cc

@@ -335,7 +335,20 @@ namespace gPanthera {

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                    auto *stack = switcher->get_stack();
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                    // Move the button to the new position
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                    pane->redock(stack);
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                pane->insert_before(*stack, *this->pane);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                if(switcher->get_orientation() == Gtk::Orientation::HORIZONTAL) {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                    if(x < static_cast<double>(this->get_allocated_width()) / 2) {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                        pane->insert_before(*stack, *this->pane);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                    } else {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                        pane->insert_after(*stack, *this->pane);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                    }
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                } else if(switcher->get_orientation() == Gtk::Orientation::VERTICAL) {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                    if(y < static_cast<double>(this->get_allocated_height()) / 2) {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                        pane->insert_before(*stack, *this->pane);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                    } else {
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                        pane->insert_after(*stack, *this->pane);
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                    }
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                                }
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                    switcher->update_buttons();
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                                }
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                            }