From 0c7dd38f8560d14a07630f7aad926a01d3d1c795 Mon Sep 17 00:00:00 2001 From: Pan7 Date: Tue, 6 Oct 2015 15:22:28 +0200 Subject: [PATCH] 4way layout center --- radiant/gtkmisc.cpp | 2 +- radiant/mainframe.cpp | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/radiant/gtkmisc.cpp b/radiant/gtkmisc.cpp index eecc2c1b..bf65888d 100644 --- a/radiant/gtkmisc.cpp +++ b/radiant/gtkmisc.cpp @@ -910,7 +910,7 @@ int WINAPI gtk_MessageBoxNew( void *parent, const char *message, // add message GtkWidget *dlg_msg = gtk_label_new( message ); gtk_box_pack_start( GTK_BOX( icon_text_hbox ), dlg_msg, FALSE, FALSE, MSGBOX_PAD_MINOR ); - gtk_label_set_justify( GTK_LABEL( dlg_msg ), GTK_JUSTIFY_LEFT ); + gtk_widget_set_halign( dlg_msg, GTK_ALIGN_START ); gtk_widget_show( dlg_msg ); // add buttons diff --git a/radiant/mainframe.cpp b/radiant/mainframe.cpp index 94dd724c..e6567482 100644 --- a/radiant/mainframe.cpp +++ b/radiant/mainframe.cpp @@ -2779,7 +2779,7 @@ void MainFrame::Create(){ else if ( CurrentStyle() == eFloating ) { { GtkWidget* wnd = create_floating( this ); - gtk_window_set_title( GTK_WINDOW( wnd ), "Camera" ); + gtk_window_set_title( GTK_WINDOW( wnd ), _( "Camera" ) ); #ifdef _WIN32 if ( g_PrefsDlg.m_bStartOnPrimMon ) { @@ -2805,7 +2805,7 @@ void MainFrame::Create(){ { GtkWidget* wnd = create_floating( this ); - gtk_window_set_title( GTK_WINDOW( wnd ), "XY View" ); + gtk_window_set_title( GTK_WINDOW( wnd ), _( "XY View" ) ); #ifdef _WIN32 if ( g_PrefsDlg.m_bStartOnPrimMon ) { @@ -2830,7 +2830,7 @@ void MainFrame::Create(){ else { GtkWidget* wnd = create_floating( this ); - gtk_window_set_title( GTK_WINDOW( wnd ), "XY View" ); + gtk_window_set_title( GTK_WINDOW( wnd ), _( "XY View" ) ); #ifdef _WIN32 if ( g_PrefsDlg.m_bStartOnPrimMon ) { @@ -3001,18 +3001,21 @@ void MainFrame::Create(){ { gint max_position; - g_object_get( m_pSplits[0], "max-position", &max_position, NULL ); + //g_object_get( m_pSplits[0], "max-position", &max_position, NULL ); + max_position = gtk_widget_get_allocated_width( m_pSplits[0] ); int x = max_position / 2 - gutter; gtk_paned_set_position( GTK_PANED( m_pSplits[0] ), x ); } { gint max_position; - g_object_get( m_pSplits[0], "max-position", &max_position, NULL ); + //g_object_get( m_pSplits[0], "max-position", &max_position, NULL ); + max_position = gtk_widget_get_allocated_height( m_pSplits[0] ); int y = max_position / 2 - gutter; gtk_paned_set_position( GTK_PANED( m_pSplits[1] ), y ); gtk_paned_set_position( GTK_PANED( m_pSplits[2] ), y ); } + } if ( g_PrefsDlg.mWindowInfo.nState & GDK_WINDOW_STATE_MAXIMIZED ) {