Flip the toolbar of the panel as well when aligning it to the right
This commit is contained in:
parent
2347045245
commit
30729676db
3 changed files with 27 additions and 0 deletions
|
@ -3975,6 +3975,8 @@ _midori_browser_update_settings (MidoriBrowser* browser)
|
|||
}
|
||||
g_object_unref (browser->panel);
|
||||
g_object_unref (vpaned);
|
||||
midori_panel_set_right_aligned (MIDORI_PANEL (browser->panel),
|
||||
right_align_sidepanel);
|
||||
gtk_paned_set_position (GTK_PANED (gtk_widget_get_parent (browser->panel)),
|
||||
last_panel_position);
|
||||
midori_panel_set_current_page (MIDORI_PANEL (browser->panel), last_panel_page);
|
||||
|
|
|
@ -322,6 +322,27 @@ midori_panel_set_compact (MidoriPanel* panel,
|
|||
compact ? GTK_TOOLBAR_ICONS : GTK_TOOLBAR_BOTH);
|
||||
}
|
||||
|
||||
/**
|
||||
* midori_panel_set_right_aligned:
|
||||
* @compact: %TRUE if the panel should be aligned to the right
|
||||
*
|
||||
* Determines if the panel should be right aligned.
|
||||
*
|
||||
* Since: 0.1.3
|
||||
**/
|
||||
void
|
||||
midori_panel_set_right_aligned (MidoriPanel* panel,
|
||||
gboolean right_aligned)
|
||||
{
|
||||
GtkWidget* box;
|
||||
|
||||
g_return_if_fail (MIDORI_IS_PANEL (panel));
|
||||
|
||||
box = gtk_widget_get_parent (panel->toolbar);
|
||||
gtk_box_reorder_child (GTK_BOX (box), panel->toolbar,
|
||||
right_aligned ? -1 : 0);
|
||||
}
|
||||
|
||||
static void
|
||||
midori_panel_menu_item_activate_cb (GtkWidget* widget,
|
||||
MidoriPanel* panel)
|
||||
|
|
|
@ -46,6 +46,10 @@ void
|
|||
midori_panel_set_compact (MidoriPanel* panel,
|
||||
gboolean compact);
|
||||
|
||||
void
|
||||
midori_panel_set_right_aligned (MidoriPanel* panel,
|
||||
gboolean right_aligned);
|
||||
|
||||
gint
|
||||
midori_panel_append_page (MidoriPanel* panel,
|
||||
MidoriViewable* viewable);
|
||||
|
|
Loading…
Reference in a new issue