diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-11-01 02:04:54 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-11-04 20:26:19 +0100 |
commit | b59b183ce3b84bec6722110ee80d6158b6a60377 (patch) | |
tree | 22a19229e1645b7bb5519eade6b2adc10f635906 | |
parent | 5929a87b8137bf6326adfd4ddfd8075e585ae15c (diff) |
line spacing: Convert the ParaLineSpacingControl to .ui.
Change-Id: I81dd0d541e7f7dd3e3fb881c2c318f9adc733fde
-rw-r--r-- | include/svx/dialogs.hrc | 10 | ||||
-rw-r--r-- | svx/UIConfig_svx.mk | 1 | ||||
-rw-r--r-- | svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx | 530 | ||||
-rw-r--r-- | svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx | 32 | ||||
-rw-r--r-- | svx/source/sidebar/paragraph/ParaPropertyPanel.hrc | 16 | ||||
-rw-r--r-- | svx/source/sidebar/paragraph/ParaPropertyPanel.src | 179 | ||||
-rw-r--r-- | svx/uiconfig/ui/paralinespacingcontrol.ui | 302 |
7 files changed, 546 insertions, 524 deletions
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc index d3a74f08198a..142da5906e77 100644 --- a/include/svx/dialogs.hrc +++ b/include/svx/dialogs.hrc @@ -1015,16 +1015,6 @@ #define RID_SVX_SIDEBAR_BEGIN (RID_SVX_START + 1241) #define IMG_SPACE3 (RID_SVX_SIDEBAR_BEGIN + 0) #define IMG_INDENT_HANG (RID_SVX_SIDEBAR_BEGIN + 1) -#define IMG_SPACING1 (RID_SVX_SIDEBAR_BEGIN + 2) -#define IMG_SPACING115 (RID_SVX_SIDEBAR_BEGIN + 3) -#define IMG_SPACING15 (RID_SVX_SIDEBAR_BEGIN + 4) -#define IMG_SPACING2 (RID_SVX_SIDEBAR_BEGIN + 5) -#define IMG_SEL_SPACING1 (RID_SVX_SIDEBAR_BEGIN + 6) -#define IMG_SEL_SPACING115 (RID_SVX_SIDEBAR_BEGIN + 7) -#define IMG_SEL_SPACING15 (RID_SVX_SIDEBAR_BEGIN + 8) -#define IMG_SEL_SPACING2 (RID_SVX_SIDEBAR_BEGIN + 9) -#define IMG_PARA_CUSTOM (RID_SVX_SIDEBAR_BEGIN + 10) -#define IMG_PARA_CUSTOM_GRAY (RID_SVX_SIDEBAR_BEGIN + 11) #define IL_NUM_BULLET (RID_SVX_SIDEBAR_BEGIN + 12) #define IL_NUM_BULLET_RTL (RID_SVX_SIDEBAR_BEGIN + 13) #define IMG_NONE_ICON (RID_SVX_SIDEBAR_BEGIN + 21) diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk index 2e3cc8eb0780..ea01872a8540 100644 --- a/svx/UIConfig_svx.mk +++ b/svx/UIConfig_svx.mk @@ -41,6 +41,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\ svx/uiconfig/ui/linkwarndialog \ svx/uiconfig/ui/namespacedialog \ svx/uiconfig/ui/optgridpage \ + svx/uiconfig/ui/paralinespacingcontrol \ svx/uiconfig/ui/passwd \ svx/uiconfig/ui/querydeletecontourdialog \ svx/uiconfig/ui/querydeleteobjectdialog \ diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx index 5b890e995730..a8c20f9b4707 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.cxx @@ -55,112 +55,65 @@ using namespace svx; using namespace svx::sidebar; ParaLineSpacingControl::ParaLineSpacingControl(sal_uInt16 nId, const css::uno::Reference<css::frame::XFrame>& rFrame, vcl::Window* pParentWindow, WinBits nBits) - : SfxPopupWindow(nId, rFrame, pParentWindow, nBits) + : SfxPopupWindow(nId, "ParaLineSpacingControl", "svx/ui/paralinespacingcontrol.ui") , mbUseLineSPCustom(false) , mbLineSPDisable(false) , mpBindings(NULL) , nMinFixDist(BEGIN_VALUE) - , pActLineDistFld(&aLineDistAtPercentBox) - , maLineSpacing(ValueSetWithTextControl::IMAGE_TEXT,this, SVX_RES( LINE_SPACING ) ) - , maCustomFT ( this, SVX_RES( FT_CUSTOM ) ) - , maLSpacingFT ( this, SVX_RES( FT_LINE_SPACING ) ) - , aLineDist( this, SVX_RES( LB_LINE_SPACING )) - , maOfFT ( this, SVX_RES( FT_OF ) ) - , aLineDistAtPercentBox ( this, SVX_RES( ED_SBINDE_LINEDISTPERCENT ) ) - , aLineDistAtMetricBox ( this, SVX_RES( ED_SBINDE_LINEDISTPOINT ) ) - , maSpacing1 (SVX_RES(IMG_SPACING1)) - , maSpacing115 (SVX_RES(IMG_SPACING115)) - , maSpacing15 (SVX_RES(IMG_SPACING15)) - , maSpacing2 (SVX_RES(IMG_SPACING2)) - , maSelSpacing1 (SVX_RES(IMG_SEL_SPACING1)) - , maSelSpacing115 (SVX_RES(IMG_SEL_SPACING115)) - , maSelSpacing15 (SVX_RES(IMG_SEL_SPACING15)) - , maSelSpacing2 (SVX_RES(IMG_SEL_SPACING2)) - , maImgCus (SVX_RES(IMG_PARA_CUSTOM)) - , maImgCusGrey (SVX_RES(IMG_PARA_CUSTOM_GRAY)) - , maStrCus (SVX_RESSTR(STR_LCVALUE)) - , mpImg(NULL) - , mpImgSel(NULL) - , mpStr(NULL) - , mpStrTip(NULL) - , maLine(SVX_RESSTR(STR_LSPACING)) - , maOf(SVX_RESSTR(STR_LS_OF)) +// , maLineSpacing(ValueSetWithTextControl::IMAGE_TEXT,this, SVX_RES( LINE_SPACING ) ) , maValue( 0 ) , maPos( 0 ) { + mpLineDist = get<ListBox>("line_dist"); + mpLineDistAtPercentBox = get<MetricField>("percent_box"); + mpLineDistAtMetricBox = get<MetricField>("metric_box"); + + pActLineDistFld = mpLineDistAtPercentBox; + initial(); - FreeResource(); m_eLNSpaceUnit = SFX_MAPUNIT_100TH_MM; } ParaLineSpacingControl::~ParaLineSpacingControl() { - delete[] mpImg; - delete[] mpImgSel; - delete[] mpStr; - delete[] mpStrTip; } void ParaLineSpacingControl::initial() { - maLineSpacing.SetStyle( maLineSpacing.GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT ); - - maLineSpacing.SetControlBackground( - GetSettings().GetStyleSettings().GetHighContrastMode() - ? GetSettings().GetStyleSettings().GetMenuColor() - : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground )); - maLineSpacing.SetColor( - GetSettings().GetStyleSettings().GetHighContrastMode() - ? GetSettings().GetStyleSettings().GetMenuColor() - : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground )); - maLineSpacing.SetBackground( - GetSettings().GetStyleSettings().GetHighContrastMode() - ? GetSettings().GetStyleSettings().GetMenuColor() - : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground )); - - mpImg = new Image[4]; - mpImg[0] = maSpacing1; - mpImg[1] = maSpacing115; - mpImg[2] = maSpacing15; - mpImg[3] = maSpacing2; - - mpImgSel = new Image[4]; - mpImgSel[0] = maSelSpacing1; - mpImgSel[1] = maSelSpacing115; - mpImgSel[2] = maSelSpacing15; - mpImgSel[3] = maSelSpacing2; - - mpStr = new OUString[4]; - mpStr[0] = SVX_RESSTR(STR_SPACING1); - mpStr[1] = SVX_RESSTR(STR_SPACING115); - mpStr[2] = SVX_RESSTR(STR_SPACING15); - mpStr[3] = SVX_RESSTR(STR_SPACING2); - - mpStrTip = new OUString[4]; - mpStrTip[0] = SVX_RESSTR(STR_LS_SINGLE); - mpStrTip[1] = SVX_RESSTR(STR_LS_115); - mpStrTip[2] = SVX_RESSTR(STR_LS_15); - mpStrTip[3] = SVX_RESSTR(STR_LS_DOUBLE); - for (int i=0;i<4;i++) - maLineSpacing.AddItem(mpImg[i], &mpImgSel[i],mpStr[i],&mpStrTip[i]); - - maLineSpacing.AddItem( maImgCus, 0, maStrCus, 0 ); +// maLineSpacing.SetStyle( maLineSpacing.GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT ); +// +// maLineSpacing.SetControlBackground( +// GetSettings().GetStyleSettings().GetHighContrastMode() +// ? GetSettings().GetStyleSettings().GetMenuColor() +// : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground )); +// maLineSpacing.SetColor( +// GetSettings().GetStyleSettings().GetHighContrastMode() +// ? GetSettings().GetStyleSettings().GetMenuColor() +// : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground )); +// maLineSpacing.SetBackground( +// GetSettings().GetStyleSettings().GetHighContrastMode() +// ? GetSettings().GetStyleSettings().GetMenuColor() +// : sfx2::sidebar::Theme::GetColor( sfx2::sidebar::Theme::Paint_PanelBackground )); + +// for (int i=0;i<4;i++) +// maLineSpacing.AddItem(mpImg[i], &mpImgSel[i],mpStr[i],&mpStrTip[i]); + +// maLineSpacing.AddItem( maImgCus, 0, maStrCus, 0 ); SetAllNoSel(); Link aLink = LINK(this, ParaLineSpacingControl,VSSelHdl ); - maLineSpacing.SetSelectHdl(aLink); - maLineSpacing.StartSelection(); - maLineSpacing.Show(); +// maLineSpacing.SetSelectHdl(aLink); +// maLineSpacing.StartSelection(); +// maLineSpacing.Show(); aLink = LINK( this, ParaLineSpacingControl, LineSPDistHdl_Impl ); - aLineDist.SetSelectHdl(aLink); - aLineDist.SelectEntryPos( LLINESPACE_1 ) ; + mpLineDist->SetSelectHdl(aLink); + mpLineDist->SelectEntryPos( LLINESPACE_1 ) ; aLink = LINK( this, ParaLineSpacingControl, LineSPDistAtHdl_Impl ); - aLineDistAtPercentBox.SetModifyHdl( aLink ); - aLineDistAtMetricBox.SetModifyHdl( aLink ); + mpLineDistAtPercentBox->SetModifyHdl( aLink ); + mpLineDistAtMetricBox->SetModifyHdl( aLink ); } - void ParaLineSpacingControl::PopupModeEndCallback() { if( mbUseLineSPCustom ) @@ -206,62 +159,62 @@ void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMe OUString aWinData( aTmp ); maValue = (sal_uInt16)aWinData.toInt32(); } - OUString sHelpText; - switch(maPos) - { - case LLINESPACE_1: - sHelpText += mpStrTip[0]; - break; - case LLINESPACE_15: - sHelpText += mpStrTip[2]; - break; - case LLINESPACE_2: - sHelpText += mpStrTip[3]; - break; - case LLINESPACE_PROP: - sHelpText +=maLine; - sHelpText += "Proportion: "; - sHelpText += maOf; - sHelpText += OUString::number( maValue ); - break; - case LLINESPACE_MIN: - sHelpText += maLine; - sHelpText += "At Least: "; - sHelpText += maOf; - sHelpText += OUString::number( maValue ); - break; - case LLINESPACE_DURCH: - sHelpText += maLine; - sHelpText += "Leading: "; - sHelpText += maOf; - sHelpText += OUString::number( maValue ); - break; - case LLINESPACE_FIX: - sHelpText += maLine; - sHelpText += "Fixed: "; - sHelpText += maOf; - sHelpText += OUString::number( maValue ); - break; - } +// OUString sHelpText; +// switch(maPos) +// { +// case LLINESPACE_1: +// sHelpText += mpStrTip[0]; +// break; +// case LLINESPACE_15: +// sHelpText += mpStrTip[2]; +// break; +// case LLINESPACE_2: +// sHelpText += mpStrTip[3]; +// break; +// case LLINESPACE_PROP: +// sHelpText +=maLine; +// sHelpText += "Proportion: "; +// sHelpText += maOf; +// sHelpText += OUString::number( maValue ); +// break; +// case LLINESPACE_MIN: +// sHelpText += maLine; +// sHelpText += "At Least: "; +// sHelpText += maOf; +// sHelpText += OUString::number( maValue ); +// break; +// case LLINESPACE_DURCH: +// sHelpText += maLine; +// sHelpText += "Leading: "; +// sHelpText += maOf; +// sHelpText += OUString::number( maValue ); +// break; +// case LLINESPACE_FIX: +// sHelpText += maLine; +// sHelpText += "Fixed: "; +// sHelpText += maOf; +// sHelpText += OUString::number( maValue ); +// break; +// } if( !aWinOpt.Exists() && !aWinOpt2.Exists() ) mbLineSPDisable = true; else mbLineSPDisable = false; - if( mbLineSPDisable ) - maLineSpacing.ReplaceItemImages(5, maImgCusGrey,0); - else - { - maLineSpacing.ReplaceItemImages(5, maImgCus,0); - maLineSpacing.SetItemText(5,sHelpText); - } +// if( mbLineSPDisable ) +// maLineSpacing.ReplaceItemImages(5, maImgCusGrey,0); +// else +// { +// maLineSpacing.ReplaceItemImages(5, maImgCus,0); +// maLineSpacing.SetItemText(5,sHelpText); +// } SfxItemState eState = currSPState; - SetFieldUnit( aLineDistAtMetricBox, currMetricUnit ); + SetFieldUnit(*mpLineDistAtMetricBox, currMetricUnit); // mpLineSPPage->SetAllNoSel(); - aLineDist.Enable(); + mpLineDist->Enable(); pActLineDistFld->Enable(); pActLineDistFld->SetText( "" ); //bool bValueSetFocus = sal_False; //wj @@ -282,13 +235,13 @@ void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMe { case SVX_INTER_LINE_SPACE_OFF: { - aLineDist.SelectEntryPos( LLINESPACE_1 ); + mpLineDist->SelectEntryPos( LLINESPACE_1 ); pActLineDistFld->Disable(); pActLineDistFld->SetText( "" ); mbUseLineSPCustom = DO_NOT_CUSTOM; if ( LINESPACE_1 == currSPItem->GetPropLineSpace() ) { - maLineSpacing.SelectItem(1); +// maLineSpacing.SelectItem(1); //bValueSetFocus = sal_True; //wj } } @@ -298,95 +251,94 @@ void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMe { if ( LINESPACE_1 == currSPItem->GetPropLineSpace() ) { - aLineDist.SelectEntryPos( LLINESPACE_1 ); + mpLineDist->SelectEntryPos( LLINESPACE_1 ); pActLineDistFld->Disable(); pActLineDistFld->SetText( "" ); mbUseLineSPCustom = DO_NOT_CUSTOM; - maLineSpacing.SelectItem(1); +// maLineSpacing.SelectItem(1); //bValueSetFocus = sal_True; //wj break; } if ( LINESPACE_15 == currSPItem->GetPropLineSpace() ) { - aLineDist.SelectEntryPos( LLINESPACE_15 ); + mpLineDist->SelectEntryPos( LLINESPACE_15 ); pActLineDistFld->Disable(); pActLineDistFld->SetText( "" ); mbUseLineSPCustom = DO_NOT_CUSTOM; - maLineSpacing.SelectItem(3); +// maLineSpacing.SelectItem(3); //bValueSetFocus = sal_True; //wj break; } if ( LINESPACE_2 == currSPItem->GetPropLineSpace() ) { - aLineDist.SelectEntryPos( LLINESPACE_2 ); + mpLineDist->SelectEntryPos( LLINESPACE_2 ); pActLineDistFld->Disable(); pActLineDistFld->SetText( "" ); mbUseLineSPCustom = DO_NOT_CUSTOM; - maLineSpacing.SelectItem(4); +// maLineSpacing.SelectItem(4); //bValueSetFocus = sal_True; //wj break; } - aLineDist.SelectEntryPos( LLINESPACE_PROP ); - if(pActLineDistFld != &(aLineDistAtPercentBox)) + mpLineDist->SelectEntryPos( LLINESPACE_PROP ); + if(pActLineDistFld != mpLineDistAtPercentBox) { pActLineDistFld->Disable(); pActLineDistFld->Hide(); - pActLineDistFld = &(aLineDistAtPercentBox); + pActLineDistFld = mpLineDistAtPercentBox; } else { - pActLineDistFld = &(aLineDistAtMetricBox); + pActLineDistFld = mpLineDistAtMetricBox; pActLineDistFld->Disable(); pActLineDistFld->Hide(); - pActLineDistFld = &(aLineDistAtPercentBox); + pActLineDistFld = mpLineDistAtPercentBox; } pActLineDistFld->Enable(); pActLineDistFld->Show(); - aLineDistAtPercentBox. - SetValue( aLineDistAtPercentBox.Normalize( + mpLineDistAtPercentBox-> + SetValue( mpLineDistAtPercentBox->Normalize( currSPItem->GetPropLineSpace() ) ); if( currSPItem->GetPropLineSpace() == LINESPACE_115 ) { mbUseLineSPCustom = DO_NOT_CUSTOM; - maLineSpacing.SelectItem(2); +// maLineSpacing.SelectItem(2); //bValueSetFocus = sal_True; //wj } else { mbUseLineSPCustom = USE_CUSTOM; - maLineSpacing.SetNoSelection(); - maLineSpacing.SelectItem(0); +// maLineSpacing.SetNoSelection(); +// maLineSpacing.SelectItem(0); } } break; case SVX_INTER_LINE_SPACE_FIX: { - if(pActLineDistFld != &(aLineDistAtMetricBox)) + if(pActLineDistFld != mpLineDistAtMetricBox) { pActLineDistFld->Disable(); pActLineDistFld->Hide(); - pActLineDistFld = &(aLineDistAtMetricBox); + pActLineDistFld = mpLineDistAtMetricBox; } else { - pActLineDistFld = &(aLineDistAtPercentBox); + pActLineDistFld = mpLineDistAtPercentBox; pActLineDistFld->Disable(); pActLineDistFld->Hide(); - pActLineDistFld = &(aLineDistAtMetricBox); + pActLineDistFld = mpLineDistAtMetricBox; } pActLineDistFld->Enable(); pActLineDistFld->Show(); - maLineSpacing.SetNoSelection(); - maLineSpacing.SelectItem(0); +// maLineSpacing.SetNoSelection(); +// maLineSpacing.SelectItem(0); - SetMetricValue( aLineDistAtMetricBox, - currSPItem->GetInterLineSpace(), eUnit ); - aLineDist.SelectEntryPos( LLINESPACE_DURCH ); + SetMetricValue(*mpLineDistAtMetricBox, currSPItem->GetInterLineSpace(), eUnit); + mpLineDist->SelectEntryPos( LLINESPACE_DURCH ); mbUseLineSPCustom = USE_CUSTOM; } @@ -398,53 +350,52 @@ void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMe break; case SVX_LINE_SPACE_FIX: { - if(pActLineDistFld != &(aLineDistAtMetricBox)) + if(pActLineDistFld != mpLineDistAtMetricBox) { pActLineDistFld->Disable(); pActLineDistFld->Hide(); - pActLineDistFld = &(aLineDistAtMetricBox); + pActLineDistFld = mpLineDistAtMetricBox; } else { - pActLineDistFld = &(aLineDistAtPercentBox); + pActLineDistFld = mpLineDistAtPercentBox; pActLineDistFld->Disable(); pActLineDistFld->Hide(); - pActLineDistFld = &(aLineDistAtMetricBox); + pActLineDistFld = mpLineDistAtMetricBox; } pActLineDistFld->Enable(); pActLineDistFld->Show(); - maLineSpacing.SetNoSelection(); - maLineSpacing.SelectItem(0); - - SetMetricValue(aLineDistAtMetricBox, currSPItem->GetLineHeight(), eUnit); - aLineDist.SelectEntryPos( LLINESPACE_FIX ); +// maLineSpacing.SetNoSelection(); +// maLineSpacing.SelectItem(0); + SetMetricValue(*mpLineDistAtMetricBox, currSPItem->GetLineHeight(), eUnit); + mpLineDist->SelectEntryPos( LLINESPACE_FIX ); mbUseLineSPCustom = USE_CUSTOM; } break; case SVX_LINE_SPACE_MIN: { - if(pActLineDistFld != &(aLineDistAtMetricBox)) + if(pActLineDistFld != mpLineDistAtMetricBox) { pActLineDistFld->Disable(); pActLineDistFld->Hide(); - pActLineDistFld = &(aLineDistAtMetricBox); + pActLineDistFld = mpLineDistAtMetricBox; } else { - pActLineDistFld = &(aLineDistAtPercentBox); + pActLineDistFld = mpLineDistAtPercentBox; pActLineDistFld->Disable(); pActLineDistFld->Hide(); - pActLineDistFld = &(aLineDistAtMetricBox); + pActLineDistFld = mpLineDistAtMetricBox; } pActLineDistFld->Enable(); pActLineDistFld->Show(); - maLineSpacing.SetNoSelection(); - maLineSpacing.SelectItem(0); +// maLineSpacing.SetNoSelection(); +// maLineSpacing.SelectItem(0); - SetMetricValue(aLineDistAtMetricBox, currSPItem->GetLineHeight(), eUnit); - aLineDist.SelectEntryPos( LLINESPACE_MIN ); + SetMetricValue(*mpLineDistAtMetricBox, currSPItem->GetLineHeight(), eUnit); + mpLineDist->SelectEntryPos( LLINESPACE_MIN ); mbUseLineSPCustom = USE_CUSTOM; } break; @@ -454,11 +405,11 @@ void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMe } else if( eState == SfxItemState::DISABLED ) { - aLineDist.Disable(); + mpLineDist->Disable(); pActLineDistFld->Enable(false); pActLineDistFld->SetText( "" ); - maLineSpacing.SetNoSelection(); - maLineSpacing.SelectItem(0); +// maLineSpacing.SetNoSelection(); +// maLineSpacing.SelectItem(0); mbUseLineSPCustom = DO_NOT_CUSTOM; } @@ -466,15 +417,15 @@ void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMe { pActLineDistFld->Enable(false); pActLineDistFld->SetText( "" ); - aLineDist.SetNoSelection(); - maLineSpacing.SetNoSelection(); - maLineSpacing.SelectItem(0); + mpLineDist->SetNoSelection(); +// maLineSpacing.SetNoSelection(); +// maLineSpacing.SelectItem(0); mbUseLineSPCustom = DO_NOT_CUSTOM; } - aLineDist.SaveValue(); + mpLineDist->SaveValue(); - const sal_uInt16 uCount = aLineDist.GetEntryCount(); + const sal_uInt16 uCount = mpLineDist->GetEntryCount(); if( uCount == LLINESPACE_FIX + 1 ) { switch (currentContext.GetCombinedContext_DI()) @@ -488,7 +439,7 @@ void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMe case CombinedEnumContext(Application_WriterVariants, Context_DrawText): case CombinedEnumContext(Application_WriterVariants, Context_Annotation): { - aLineDist.RemoveEntry(LLINESPACE_FIX); + mpLineDist->RemoveEntry(LLINESPACE_FIX); } } } @@ -500,26 +451,26 @@ void ParaLineSpacingControl::Rearrange(SfxItemState currSPState,FieldUnit currMe case CombinedEnumContext(Application_WriterVariants, Context_Text): case CombinedEnumContext(Application_WriterVariants, Context_Table): { - aLineDist.InsertEntry(OUString("Fixed"), LLINESPACE_FIX); + mpLineDist->InsertEntry(OUString("Fixed"), LLINESPACE_FIX); } } } - maLineSpacing.Format(); - maLineSpacing.StartSelection(); +// maLineSpacing.Format(); +// maLineSpacing.StartSelection(); } void ParaLineSpacingControl::SetAllNoSel() { - maLineSpacing.SelectItem(1); - maLineSpacing.SetNoSelection(); +// maLineSpacing.SelectItem(1); +// maLineSpacing.SetNoSelection(); } IMPL_LINK( ParaLineSpacingControl, LineSPDistHdl_Impl, ListBox*, pBox ) { - maLineSpacing.SetNoSelection(); - maLineSpacing.SelectItem(0); - maLineSpacing.Format(); - maLineSpacing.StartSelection(); +// maLineSpacing.SetNoSelection(); +// maLineSpacing.SelectItem(0); +// maLineSpacing.Format(); +// maLineSpacing.StartSelection(); switch( pBox->GetSelectEntryPos() ) { @@ -531,54 +482,54 @@ IMPL_LINK( ParaLineSpacingControl, LineSPDistHdl_Impl, ListBox*, pBox ) break; case LLINESPACE_DURCH: - aLineDistAtPercentBox.Hide(); - pActLineDistFld = &aLineDistAtMetricBox; - aLineDistAtMetricBox.SetMin(0); + mpLineDistAtPercentBox->Hide(); + pActLineDistFld = mpLineDistAtMetricBox; + mpLineDistAtMetricBox->SetMin(0); - if ( aLineDistAtMetricBox.GetText().isEmpty() ) - aLineDistAtMetricBox.SetValue( - aLineDistAtMetricBox.Normalize( 0 ) ); - aLineDistAtPercentBox.Hide(); + if ( mpLineDistAtMetricBox->GetText().isEmpty() ) + mpLineDistAtMetricBox->SetValue( + mpLineDistAtMetricBox->Normalize( 0 ) ); + mpLineDistAtPercentBox->Hide(); pActLineDistFld->Show(); pActLineDistFld->Enable(); break; case LLINESPACE_MIN: - aLineDistAtPercentBox.Hide(); - pActLineDistFld = &aLineDistAtMetricBox; - aLineDistAtMetricBox.SetMin(0); - - if ( aLineDistAtMetricBox.GetText().isEmpty() ) - aLineDistAtMetricBox.SetValue( - aLineDistAtMetricBox.Normalize( 0 ), FUNIT_TWIP ); - aLineDistAtPercentBox.Hide(); + mpLineDistAtPercentBox->Hide(); + pActLineDistFld = mpLineDistAtMetricBox; + mpLineDistAtMetricBox->SetMin(0); + + if ( mpLineDistAtMetricBox->GetText().isEmpty() ) + mpLineDistAtMetricBox->SetValue( + mpLineDistAtMetricBox->Normalize( 0 ), FUNIT_TWIP ); + mpLineDistAtPercentBox->Hide(); pActLineDistFld->Show(); pActLineDistFld->Enable(); break; case LLINESPACE_PROP: - aLineDistAtMetricBox.Hide(); - pActLineDistFld = &aLineDistAtPercentBox; + mpLineDistAtMetricBox->Hide(); + pActLineDistFld = mpLineDistAtPercentBox; - if ( aLineDistAtPercentBox.GetText().isEmpty() ) - aLineDistAtPercentBox.SetValue( - aLineDistAtPercentBox.Normalize( 100 ), FUNIT_TWIP ); - aLineDistAtMetricBox.Hide(); + if ( mpLineDistAtPercentBox->GetText().isEmpty() ) + mpLineDistAtPercentBox->SetValue( + mpLineDistAtPercentBox->Normalize( 100 ), FUNIT_TWIP ); + mpLineDistAtMetricBox->Hide(); pActLineDistFld->Show(); pActLineDistFld->Enable(); break; case LLINESPACE_FIX: { - aLineDistAtPercentBox.Hide(); - pActLineDistFld = &aLineDistAtMetricBox; - sal_Int64 nTemp = aLineDistAtMetricBox.GetValue(); - aLineDistAtMetricBox.SetMin(aLineDistAtMetricBox.Normalize(nMinFixDist), FUNIT_TWIP); - - if ( aLineDistAtMetricBox.GetValue() != nTemp ) - SetMetricValue( aLineDistAtMetricBox, - FIX_DIST_DEF, SFX_MAPUNIT_TWIP ); - aLineDistAtPercentBox.Hide(); + mpLineDistAtPercentBox->Hide(); + pActLineDistFld = mpLineDistAtMetricBox; + sal_Int64 nTemp = mpLineDistAtMetricBox->GetValue(); + mpLineDistAtMetricBox->SetMin(mpLineDistAtMetricBox->Normalize(nMinFixDist), FUNIT_TWIP); + + if ( mpLineDistAtMetricBox->GetValue() != nTemp ) + SetMetricValue(*mpLineDistAtMetricBox, FIX_DIST_DEF, SFX_MAPUNIT_TWIP); + + mpLineDistAtPercentBox->Hide(); pActLineDistFld->Show(); pActLineDistFld->Enable(); } @@ -596,11 +547,11 @@ IMPL_LINK_NOARG( ParaLineSpacingControl, LineSPDistAtHdl_Impl ) void ParaLineSpacingControl::ExecuteLineSpace() { - aLineDist.SaveValue(); - maLineSpacing.SetNoSelection(); + mpLineDist->SaveValue(); +// maLineSpacing.SetNoSelection(); SvxLineSpacingItem aSpacing(_DEFAULT_LINE_SPACING, SID_ATTR_PARA_LINESPACE); - sal_uInt16 nPos = aLineDist.GetSelectEntryPos(); + sal_uInt16 nPos = mpLineDist->GetSelectEntryPos(); switch ( nPos ) { @@ -616,10 +567,10 @@ void ParaLineSpacingControl::ExecuteLineSpace() case LLINESPACE_PROP: { SetLineSpace( aSpacing, nPos, - aLineDistAtPercentBox.Denormalize( - (long)aLineDistAtPercentBox.GetValue() ) ); + mpLineDistAtPercentBox->Denormalize( + (long)mpLineDistAtPercentBox->GetValue() ) ); maPos = nPos; - maValue =aLineDistAtPercentBox.GetValue(); + maValue =mpLineDistAtPercentBox->GetValue(); } break; @@ -627,10 +578,9 @@ void ParaLineSpacingControl::ExecuteLineSpace() case LLINESPACE_DURCH: case LLINESPACE_FIX: { - SetLineSpace( aSpacing, nPos, - GetCoreValue( aLineDistAtMetricBox, m_eLNSpaceUnit ) ); + SetLineSpace(aSpacing, nPos, GetCoreValue(*mpLineDistAtMetricBox, m_eLNSpaceUnit)); maPos = nPos; - maValue = GetCoreValue( aLineDistAtMetricBox, m_eLNSpaceUnit ); + maValue = GetCoreValue(*mpLineDistAtMetricBox, m_eLNSpaceUnit); } break; @@ -690,64 +640,64 @@ void ParaLineSpacingControl::SetLineSpace( SvxLineSpacingItem& rLineSpace, IMPL_LINK(ParaLineSpacingControl, VSSelHdl, void *, pControl) { - maLineSpacing.SetNoSelection(); - bool bClosePop = true; - if(pControl == &maLineSpacing) - { - sal_uInt16 iPos = maLineSpacing.GetSelectItemId(); - switch ( iPos ) - { - case 1: - ExecuteLineSpacing( false, 0 ); - break; - case 2: - ExecuteLineSpacing( false, 3 ); - break; - case 3: - ExecuteLineSpacing( false, 1 ); - break; - case 4: - ExecuteLineSpacing( false, 2 ); - break; - case 5: - { - if(!(mbLineSPDisable)) - { - aLineDist.SelectEntryPos( maPos ) ; - aLineDist.SaveValue(); - - SvxLineSpacingItem aSpacing(_DEFAULT_LINE_SPACING, SID_ATTR_PARA_LINESPACE); - switch(maPos) - { - case LLINESPACE_1: - case LLINESPACE_15: - case LLINESPACE_2: - SetLineSpace( aSpacing, maPos ); - break; - - case LLINESPACE_PROP: - SetLineSpace( aSpacing, maPos, - aLineDistAtPercentBox.Denormalize( (long)maValue ) ); - break; - - case LLINESPACE_MIN: - case LLINESPACE_DURCH: - case LLINESPACE_FIX: - SetLineSpace( aSpacing, maPos, (long)maValue ); - break; - } - - mpBindings->GetDispatcher()->Execute( - SID_ATTR_PARA_LINESPACE, SfxCallMode::RECORD, &aSpacing, 0L); - - ExecuteLineSpacing( USE_CUSTOM, 0 ); - } - else - bClosePop = false; - } - break; - } - } +// maLineSpacing.SetNoSelection(); +// bool bClosePop = true; +// if(pControl == &maLineSpacing) +// { +// sal_uInt16 iPos = maLineSpacing.GetSelectItemId(); +// switch ( iPos ) +// { +// case 1: +// ExecuteLineSpacing( false, 0 ); +// break; +// case 2: +// ExecuteLineSpacing( false, 3 ); +// break; +// case 3: +// ExecuteLineSpacing( false, 1 ); +// break; +// case 4: +// ExecuteLineSpacing( false, 2 ); +// break; +// case 5: +// { +// if(!(mbLineSPDisable)) +// { +// mpLineDist->SelectEntryPos( maPos ) ; +// mpLineDist->SaveValue(); +// +// SvxLineSpacingItem aSpacing(_DEFAULT_LINE_SPACING, SID_ATTR_PARA_LINESPACE); +// switch(maPos) +// { +// case LLINESPACE_1: +// case LLINESPACE_15: +// case LLINESPACE_2: +// SetLineSpace( aSpacing, maPos ); +// break; +// +// case LLINESPACE_PROP: +// SetLineSpace( aSpacing, maPos, +// mpLineDistAtPercentBox->Denormalize( (long)maValue ) ); +// break; +// +// case LLINESPACE_MIN: +// case LLINESPACE_DURCH: +// case LLINESPACE_FIX: +// SetLineSpace( aSpacing, maPos, (long)maValue ); +// break; +// } +// +// mpBindings->GetDispatcher()->Execute( +// SID_ATTR_PARA_LINESPACE, SfxCallMode::RECORD, &aSpacing, 0L); +// +// ExecuteLineSpacing( USE_CUSTOM, 0 ); +// } +// else +// bClosePop = false; +// } +// break; +// } +// } return 0; } @@ -756,12 +706,12 @@ void ParaLineSpacingControl::ExecuteLineSpacing( bool aIsCustom, sal_uInt16 aEnt { if( !aIsCustom ) { - aLineDist.SelectEntryPos( aEntry ) ; - aLineDist.SaveValue(); + mpLineDist->SelectEntryPos( aEntry ) ; + mpLineDist->SaveValue(); SvxLineSpacingItem aSpacing(_DEFAULT_LINE_SPACING, SID_ATTR_PARA_LINESPACE); sal_uInt16 nPos = aEntry; if( aEntry == LLINESPACE_PROP ) - SetLineSpace( aSpacing, nPos, aLineDistAtPercentBox.Denormalize( (long)115 ) ); + SetLineSpace( aSpacing, nPos, mpLineDistAtPercentBox->Denormalize( (long)115 ) ); else SetLineSpace( aSpacing, nPos ); @@ -773,7 +723,7 @@ void ParaLineSpacingControl::ExecuteLineSpacing( bool aIsCustom, sal_uInt16 aEnt { mbUseLineSPCustom = DO_NOT_CUSTOM; } - maLineSpacing.SetNoSelection(); +// maLineSpacing.SetNoSelection(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx b/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx index 1b9af2d15d3f..a4f94b6879f6 100644 --- a/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx +++ b/svx/source/sidebar/paragraph/ParaLineSpacingControl.hxx @@ -62,36 +62,10 @@ private: long nMinFixDist; Edit* pActLineDistFld; - svx::sidebar::ValueSetWithTextControl maLineSpacing; + ListBox* mpLineDist; - FixedText maCustomFT; - FixedText maLSpacingFT; - ListBox aLineDist; - - FixedText maOfFT; - MetricField aLineDistAtPercentBox; - MetricField aLineDistAtMetricBox; - - Image maSpacing1; - Image maSpacing115; - Image maSpacing15; - Image maSpacing2; - - Image maSelSpacing1; - Image maSelSpacing115; - Image maSelSpacing15; - Image maSelSpacing2; - Image maSelSelHanging; - Image maImgCus; - Image maImgCusGrey; - OUString maStrCus; - - Image* mpImg; - Image* mpImgSel; - OUString* mpStr; - OUString* mpStrTip; - OUString maLine; - OUString maOf; + MetricField* mpLineDistAtPercentBox; + MetricField* mpLineDistAtMetricBox; sal_Int64 maValue; sal_uInt16 maPos; diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc b/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc index 3b76ca445a06..b90926709592 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.hrc @@ -37,22 +37,6 @@ #define ED_SBINDE_LINEDISTPERCENT 2 #define ED_SBINDE_LINEDISTPOINT 3 -#define FT_CUSTOM 14 -#define FT_LINE_SPACING 15 -#define FT_OF 16 -#define LINE_SPACING 29 -#define STR_SPACING1 30 -#define STR_SPACING115 31 -#define STR_SPACING15 32 -#define STR_SPACING2 33 -#define STR_LCVALUE 36 -#define STR_LS_SINGLE 37 -#define STR_LS_115 38 -#define STR_LS_15 39 -#define STR_LS_DOUBLE 40 -#define STR_LSPACING 41 -#define STR_LS_OF 42 - //============================== Help ID ============================== #define HID_POPUP_BULLET_CB_BULLET_MORE "HID_POPUP_BULLET_CB_BULLET_MORE" #define HID_POPUP_BULLET_VS_VALUES "HID_POPUP_BULLET_VS_VALUES" diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.src b/svx/source/sidebar/paragraph/ParaPropertyPanel.src index 21a3fdc5b8b9..878384742832 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.src +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.src @@ -146,185 +146,6 @@ Control RID_POPUPPANEL_PARAPAGE_NUMBERING }; }; -//===========================================Line Space popup page============================== - -Image IMG_SPACING1 -{ - ImageBitmap = Bitmap{File = "symphony/lpspacing-1.png";}; -}; -Image IMG_SPACING115 -{ - ImageBitmap = Bitmap{File = "symphony/lpspacing-1_15.png";}; -}; -Image IMG_SPACING15 -{ - ImageBitmap = Bitmap{File = "symphony/lpspacing-1_5.png";}; -}; -Image IMG_SPACING2 -{ - ImageBitmap = Bitmap{File = "symphony/lpspacing-2.png";}; -}; -Image IMG_SEL_SPACING1 -{ - ImageBitmap = Bitmap{File = "symphony/lpselected-spacing-1.png";}; -}; -Image IMG_SEL_SPACING115 -{ - ImageBitmap = Bitmap{File = "symphony/lpselected-spacing-1_15.png";}; -}; -Image IMG_SEL_SPACING15 -{ - ImageBitmap = Bitmap{File = "symphony/lpselected-spacing-1_5.png";}; -}; -Image IMG_SEL_SPACING2 -{ - ImageBitmap = Bitmap{File = "symphony/lpselected-spacing-2.png";}; -}; -Image IMG_PARA_CUSTOM -{ - ImageBitmap = Bitmap{File = "symphony/last_custom_common.png";}; -}; -Image IMG_PARA_CUSTOM_GRAY -{ - ImageBitmap = Bitmap{File = "symphony/last_custom_common_grey.png";}; -}; - -Control RID_POPUPPANEL_PARAPAGE_LINESPACING -{ - OutputSize = TRUE; - DialogControl = TRUE; - Border = FALSE; - - Size = MAP_APPFONT( POPUPPANEL_MARGIN_SMALL * 2 + POPUP_BORDER_WIDTH + VS_SPACING_WIDTH, POPUP_PAGE_HEIGHT ); - - Control LINE_SPACING - { - Pos = MAP_APPFONT( POPUPPANEL_MARGIN_SMALL + OFFSET_X , POPUPPANEL_MARGIN_SMALL + OFFSET_Y ); - Size = MAP_APPFONT ( VS_SPACING_WIDTH , 17 * 5); - TabStop = TRUE ; - Text = "Line Spacing"; - }; - - FixedText FT_CUSTOM - { - Pos = MAP_APPFONT ( POP_FT_CUSTOM_X, POP_FT_CUSTOM_Y ); - Size = MAP_APPFONT ( _FIXED_TEXT_WIDTH + 50 , _FIXED_TEXT_HEIGHT) ; - Text [ en-US ] = "Custom:"; - }; - FixedText FT_LINE_SPACING - { - Pos = MAP_APPFONT ( FT_1_X, FT_1_Y ); - Size = MAP_APPFONT ( _FIXED_TEXT_WIDTH + 10, _FIXED_TEXT_HEIGHT) ; - Text [ en-US ] = "~Line Spacing:"; - }; - - FixedText FT_OF - { - Pos = MAP_APPFONT ( FT_2_X, FT_2_Y ); - Size = MAP_APPFONT ( _FIXED_TEXT_WIDTH , _FIXED_TEXT_HEIGHT) ; - Text [ en-US ] = "~Of:"; - }; - - ListBox LB_LINE_SPACING - { - Border = TRUE ; - Pos = MAP_APPFONT ( EDIT_1_X, EDIT_1_Y ); - Size = MAP_APPFONT ( BD_WIDTH - POPUPPANEL_MARGIN_LARGE * 2,LISTBOX_HEIGHT ) ; - TabStop = TRUE ; - DropDown = TRUE ; - HelpID = HID_POPUP_LS_LB_LINE_SPACING ; - StringList [ en-US ] = - { - < "Single" ; Default ; > ; - < "1.5 Lines" ; Default ; > ; - < "Double" ; Default ; > ; - < "Proportional" ; Default ; > ; - < "At least" ; Default ; > ; - < "Leading" ; Default ; > ; - < "Fixed" ; Default ; > ; - }; - }; - MetricField ED_SBINDE_LINEDISTPERCENT - { - Disable = TRUE; - Border = TRUE; - Pos = MAP_APPFONT ( EDIT_2_X, EDIT_2_Y ); - Size = MAP_APPFONT ( BD_WIDTH - POPUPPANEL_MARGIN_LARGE * 2,MBOX_HEIGHT ) ; - HelpID = HID_POPUP_LS_ED_SBINDE_LINEDISTPERCENT ; - Repeat = TRUE; - Spin = TRUE; - Minimum = 50; - Maximum = 200; - Value = 100; - StrictFormat = TRUE; - Unit = FUNIT_PERCENT ; - First = 50; - Last = 200; - SpinSize = 1; - }; - MetricField ED_SBINDE_LINEDISTPOINT - { - Disable = TRUE; - Border = TRUE; - Pos = MAP_APPFONT ( EDIT_2_X, EDIT_2_Y ); - Size = MAP_APPFONT ( BD_WIDTH - POPUPPANEL_MARGIN_LARGE * 2, MBOX_HEIGHT ) ; - HelpID = HID_POPUP_LS_ED_SBINDE_LINEDISTPOINT ; - Repeat = TRUE; - Spin = TRUE; - Maximum = 9999; - DecimalDigits = 2; - StrictFormat = TRUE ; - Unit = FUNIT_INCH; - Last = 9999; - SpinSize = 2; - }; - - String STR_LS_SINGLE - { - Text [ en-US ] = "Line spacing: Single"; - }; - String STR_LS_115 - { - Text [ en-US ] = "Line spacing: 1.15 Lines"; - }; - String STR_LS_15 - { - Text [ en-US ] = "Line spacing: 1.5 Lines"; - }; - String STR_LS_DOUBLE - { - Text [ en-US ] = "Line spacing: Double"; - }; - String STR_LSPACING - { - Text [ en-US ] = "Line spacing:"; - }; - String STR_LS_OF - { - Text [ en-US ] = "of:"; - }; - String STR_SPACING1 - { - Text [ en-US ] = "Spacing: 1"; - }; - String STR_SPACING115 - { - Text [ en-US ] = "Spacing: 1.15"; - }; - String STR_SPACING15 - { - Text [ en-US ] = "Spacing: 1.5"; - }; - String STR_SPACING2 - { - Text [ en-US ] = "Spacing: 2"; - }; - String STR_LCVALUE - { - Text [ en-US ] = "Last Custom Value"; - }; -}; - String RID_SVXSTR_NUMBULLET_NONE { Text [en-US] = "None"; diff --git a/svx/uiconfig/ui/paralinespacingcontrol.ui b/svx/uiconfig/ui/paralinespacingcontrol.ui new file mode 100644 index 000000000000..c7ad5b7fa8ab --- /dev/null +++ b/svx/uiconfig/ui/paralinespacingcontrol.ui @@ -0,0 +1,302 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.10 --> + <object class="GtkAdjustment" id="adjustment1"> + <property name="lower">50</property> + <property name="upper">200</property> + <property name="value">100</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkAdjustment" id="adjustment2"> + <property name="upper">9999</property> + <property name="step_increment">1</property> + <property name="page_increment">10</property> + </object> + <object class="GtkImage" id="image_spacing_1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="pixbuf">svx/res/symphony/lpspacing-1.png</property> + </object> + <object class="GtkImage" id="image_spacing_115"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_right">6</property> + <property name="xalign">0</property> + <property name="pixbuf">svx/res/symphony/lpspacing-1_15.png</property> + <property name="icon-size">1</property> + </object> + <object class="GtkImage" id="image_spacing_15"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_right">6</property> + <property name="xalign">0</property> + <property name="pixbuf">svx/res/symphony/lpspacing-1_5.png</property> + <property name="icon-size">1</property> + </object> + <object class="GtkImage" id="image_spacing_2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_right">6</property> + <property name="xalign">0</property> + <property name="pixbuf">svx/res/symphony/lpspacing-2.png</property> + <property name="icon-size">1</property> + </object> + <object class="GtkImage" id="image_spacing_last"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="margin_right">6</property> + <property name="xalign">0</property> + <property name="pixbuf">svx/res/symphony/last_custom_common.png</property> + <property name="icon-size">1</property> + </object> + <object class="GtkWindow" id="ParaLineSpacingControl"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="border_width">4</property> + <property name="resizable">False</property> + <property name="destroy_with_parent">True</property> + <property name="type_hint">popup-menu</property> + <property name="skip_pager_hint">True</property> + <property name="decorated">False</property> + <property name="deletable">False</property> + <child> + <object class="GtkGrid" id="grid2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="row_spacing">6</property> + <child> + <object class="GtkButton" id="spacing_1"> + <property name="label">Spacing: 1</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="image">image_spacing_1</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="spacing_115"> + <property name="label">Spacing: 1.15</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="image">image_spacing_115</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="spacing_15"> + <property name="label">Spacing: 1.5</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="image">image_spacing_15</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="spacing_2"> + <property name="label">Spacing: 2</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="image">image_spacing_2</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkButton" id="spacing_last"> + <property name="label">Last Custom Value</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <property name="image">image_spacing_last</property> + <property name="relief">none</property> + <property name="xalign">0</property> + <property name="always_show_image">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">4</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="left_padding">12</property> + <child> + <object class="GtkGrid" id="grid3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="row_spacing">6</property> + <child> + <object class="GtkLabel" id="label3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Line Spacing:</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkComboBoxText" id="line_dist"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="entry_text_column">0</property> + <property name="id_column">1</property> + <items> + <item translatable="yes">Single</item> + <item translatable="yes">1.5 Lines</item> + <item translatable="yes">Double</item> + <item translatable="yes">Proportional</item> + <item translatable="yes">At least</item> + <item translatable="yes">Leading</item> + <item translatable="yes">Fixed</item> + </items> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="label" translatable="yes">Of:</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">2</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <child> + <object class="GtkSpinButton" id="percent_box:0%"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="invisible_char">●</property> + <property name="adjustment">adjustment1</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkSpinButton" id="metric_box:0.00cm"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="invisible_char">●</property> + <property name="adjustment">adjustment2</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">3</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Custom Value</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">5</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + </child> + </object> +</interface> |