Related: fdo#34396 convert extrusion dialog to .ui
Change-Id: Iea6e42fb7b65e148dcf6b566a7595b9e18f2e2eb
This commit is contained in:
@@ -1020,7 +1020,6 @@
|
|||||||
// "ModalDialog" resource ids
|
// "ModalDialog" resource ids
|
||||||
|
|
||||||
#define RID_SVX_MDLG_FONTWORK_GALLERY ( RID_SVX_START + 2 )
|
#define RID_SVX_MDLG_FONTWORK_GALLERY ( RID_SVX_START + 2 )
|
||||||
#define RID_SVX_MDLG_EXTRUSION_DEPTH ( RID_SVX_START + 3 )
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// "Menu" resource ids
|
// "Menu" resource ids
|
||||||
|
@@ -16,6 +16,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
|
|||||||
svx/uiconfig/ui/compressgraphicdialog \
|
svx/uiconfig/ui/compressgraphicdialog \
|
||||||
svx/uiconfig/ui/deleteheaderdialog \
|
svx/uiconfig/ui/deleteheaderdialog \
|
||||||
svx/uiconfig/ui/deletefooterdialog \
|
svx/uiconfig/ui/deletefooterdialog \
|
||||||
|
svx/uiconfig/ui/extrustiondepthdialog \
|
||||||
svx/uiconfig/ui/headfootformatpage \
|
svx/uiconfig/ui/headfootformatpage \
|
||||||
svx/uiconfig/ui/findreplacedialog \
|
svx/uiconfig/ui/findreplacedialog \
|
||||||
svx/uiconfig/ui/linkwarndialog \
|
svx/uiconfig/ui/linkwarndialog \
|
||||||
|
@@ -31,15 +31,10 @@ namespace svx {
|
|||||||
|
|
||||||
class ExtrusionDepthDialog : public ModalDialog
|
class ExtrusionDepthDialog : public ModalDialog
|
||||||
{
|
{
|
||||||
FixedText maFLDepth;
|
MetricField* m_pMtrDepth;
|
||||||
MetricField maMtrDepth;
|
|
||||||
OKButton maOKButton;
|
|
||||||
CancelButton maCancelButton;
|
|
||||||
HelpButton maHelpButton;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ExtrusionDepthDialog( Window* pParent, double fDepth, FieldUnit eDefaultUnit );
|
ExtrusionDepthDialog( Window* pParent, double fDepth, FieldUnit eDefaultUnit );
|
||||||
~ExtrusionDepthDialog();
|
|
||||||
|
|
||||||
double getDepth() const;
|
double getDepth() const;
|
||||||
};
|
};
|
||||||
|
@@ -297,27 +297,17 @@ Sequence< OUString > SAL_CALL ExtrusionDirectionControl::getSupportedServiceName
|
|||||||
// ####################################################################
|
// ####################################################################
|
||||||
|
|
||||||
ExtrusionDepthDialog::ExtrusionDepthDialog( Window* pParent, double fDepth, FieldUnit eDefaultUnit )
|
ExtrusionDepthDialog::ExtrusionDepthDialog( Window* pParent, double fDepth, FieldUnit eDefaultUnit )
|
||||||
: ModalDialog( pParent, SVX_RES( RID_SVX_MDLG_EXTRUSION_DEPTH ) ),
|
: ModalDialog( pParent, "ExtrustionDepthDialog", "svx/ui/extrustiondepthdialog.ui" )
|
||||||
maFLDepth( this, SVX_RES( FL_DEPTH ) ),
|
|
||||||
maMtrDepth( this, SVX_RES( MTR_DEPTH ) ),
|
|
||||||
maOKButton( this, SVX_RES( BTN_OK ) ),
|
|
||||||
maCancelButton( this, SVX_RES( BTN_CANCEL ) ),
|
|
||||||
maHelpButton( this, SVX_RES( BTN_HELP ) )
|
|
||||||
{
|
{
|
||||||
|
get(m_pMtrDepth, "depth");
|
||||||
bool bMetric = IsMetric( eDefaultUnit );
|
bool bMetric = IsMetric( eDefaultUnit );
|
||||||
maMtrDepth.SetUnit( bMetric ? FUNIT_CM : FUNIT_INCH );
|
m_pMtrDepth->SetUnit( bMetric ? FUNIT_CM : FUNIT_INCH );
|
||||||
maMtrDepth.SetValue( (int) fDepth * 100, FUNIT_100TH_MM );
|
m_pMtrDepth->SetValue( (int) fDepth * 100, FUNIT_100TH_MM );
|
||||||
|
|
||||||
FreeResource();
|
|
||||||
}
|
|
||||||
|
|
||||||
ExtrusionDepthDialog::~ExtrusionDepthDialog()
|
|
||||||
{
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double ExtrusionDepthDialog::getDepth() const
|
double ExtrusionDepthDialog::getDepth() const
|
||||||
{
|
{
|
||||||
return (double)( maMtrDepth.GetValue( FUNIT_100TH_MM ) ) / 100.0;
|
return (double)( m_pMtrDepth->GetValue( FUNIT_100TH_MM ) ) / 100.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ####################################################################
|
// ####################################################################
|
||||||
|
@@ -80,8 +80,6 @@
|
|||||||
#define IMG_LIGHTING_NORMAL 111
|
#define IMG_LIGHTING_NORMAL 111
|
||||||
#define IMG_LIGHTING_DIM 112
|
#define IMG_LIGHTING_DIM 112
|
||||||
|
|
||||||
#define FL_DEPTH 1
|
|
||||||
#define MTR_DEPTH 2
|
|
||||||
#define BTN_OK 3
|
#define BTN_OK 3
|
||||||
#define BTN_CANCEL 4
|
#define BTN_CANCEL 4
|
||||||
#define BTN_HELP 5
|
#define BTN_HELP 5
|
||||||
|
@@ -430,63 +430,6 @@ DockingWindow RID_SVXFLOAT_EXTRUSION_SURFACE
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#define WIDTH 140
|
|
||||||
#define HEIGHT (4 * 3 + 3 * 14)
|
|
||||||
|
|
||||||
ModalDialog RID_SVX_MDLG_EXTRUSION_DEPTH
|
|
||||||
{
|
|
||||||
HelpID = "svx:ModalDialog:RID_SVX_MDLG_EXTRUSION_DEPTH";
|
|
||||||
OutputSize = TRUE;
|
|
||||||
SVLook = TRUE ;
|
|
||||||
Moveable = TRUE;
|
|
||||||
Closeable = TRUE;
|
|
||||||
|
|
||||||
Size = MAP_APPFONT( WIDTH, HEIGHT );
|
|
||||||
|
|
||||||
Text [ en-US ] = "Extrusion Depth" ;
|
|
||||||
|
|
||||||
FixedText FL_DEPTH
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( 3 , 3 ) ;
|
|
||||||
Size = MAP_APPFONT ( WIDTH - 50 - 12 , 8 ) ;
|
|
||||||
Text [ en-US ] = "~Value" ;
|
|
||||||
};
|
|
||||||
MetricField MTR_DEPTH
|
|
||||||
{
|
|
||||||
Border = FALSE ;
|
|
||||||
Pos = MAP_APPFONT ( 3 , 14 ) ;
|
|
||||||
Size = MAP_APPFONT ( WIDTH - 50 - 12, 12 ) ;
|
|
||||||
TabStop = TRUE ;
|
|
||||||
Repeat = TRUE ;
|
|
||||||
Spin = TRUE ;
|
|
||||||
Minimum = 0 ;
|
|
||||||
Maximum = 338666 ;
|
|
||||||
StrictFormat = TRUE ;
|
|
||||||
DecimalDigits = 2 ;
|
|
||||||
Unit = FUNIT_MM ;
|
|
||||||
SpinSize = 10 ;
|
|
||||||
};
|
|
||||||
OkButton BTN_OK
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( WIDTH - 50 - 3 , 1 * 3 + 0 * 14 ) ;
|
|
||||||
Size = MAP_APPFONT ( 50, 14 ) ;
|
|
||||||
DefButton = TRUE ;
|
|
||||||
TabStop = TRUE ;
|
|
||||||
};
|
|
||||||
CancelButton BTN_CANCEL
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( WIDTH - 50 - 3 , 2 * 3 + 1 * 14 ) ;
|
|
||||||
Size = MAP_APPFONT ( 50, 14 ) ;
|
|
||||||
TabStop = TRUE ;
|
|
||||||
};
|
|
||||||
HelpButton BTN_HELP
|
|
||||||
{
|
|
||||||
Pos = MAP_APPFONT ( WIDTH - 50 - 3 , 3 * 3 + 2 * 14 ) ;
|
|
||||||
Size = MAP_APPFONT ( 50, 14 ) ;
|
|
||||||
TabStop = TRUE ;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
String RID_SVXSTR_EXTRUSION_COLOR
|
String RID_SVXSTR_EXTRUSION_COLOR
|
||||||
{
|
{
|
||||||
Text [ en-US ] = "Extrusion Color";
|
Text [ en-US ] = "Extrusion Color";
|
||||||
|
156
svx/uiconfig/ui/extrustiondepthdialog.ui
Normal file
156
svx/uiconfig/ui/extrustiondepthdialog.ui
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<interface>
|
||||||
|
<!-- interface-requires gtk+ 3.0 -->
|
||||||
|
<object class="GtkAdjustment" id="adjustment1">
|
||||||
|
<property name="upper">338.666</property>
|
||||||
|
<property name="step_increment">0.10000000000000001</property>
|
||||||
|
<property name="page_increment">1</property>
|
||||||
|
</object>
|
||||||
|
<object class="GtkDialog" id="ExtrustionDepthDialog">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="border_width">6</property>
|
||||||
|
<property name="title" translatable="yes">Extrusion Depth</property>
|
||||||
|
<property name="type_hint">dialog</property>
|
||||||
|
<child internal-child="vbox">
|
||||||
|
<object class="GtkBox" id="dialog-vbox1">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="orientation">vertical</property>
|
||||||
|
<property name="spacing">12</property>
|
||||||
|
<child internal-child="action_area">
|
||||||
|
<object class="GtkButtonBox" id="dialog-action_area1">
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="layout_style">end</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="ok">
|
||||||
|
<property name="label">gtk-ok</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="can_default">True</property>
|
||||||
|
<property name="has_default">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="cancel">
|
||||||
|
<property name="label">gtk-cancel</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkButton" id="help">
|
||||||
|
<property name="label">gtk-help</property>
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="receives_default">True</property>
|
||||||
|
<property name="use_stock">True</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="pack_type">end</property>
|
||||||
|
<property name="position">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkFrame" id="frame2">
|
||||||
|
<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="alignment2">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="hexpand">True</property>
|
||||||
|
<property name="vexpand">True</property>
|
||||||
|
<property name="top_padding">6</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="column_spacing">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSpinButton" id="depth:0.00cm">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="invisible_char">•</property>
|
||||||
|
<property name="adjustment">adjustment1</property>
|
||||||
|
<property name="digits">2</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="top_attach">0</property>
|
||||||
|
<property name="width">1</property>
|
||||||
|
<property name="height">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel" id="label1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">False</property>
|
||||||
|
<property name="label" translatable="yes">_Value</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<property name="mnemonic_widget">depth:0.00cm</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>
|
||||||
|
</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">Depth</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"/>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="expand">False</property>
|
||||||
|
<property name="fill">True</property>
|
||||||
|
<property name="position">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
<action-widgets>
|
||||||
|
<action-widget response="0">ok</action-widget>
|
||||||
|
<action-widget response="0">cancel</action-widget>
|
||||||
|
<action-widget response="0">help</action-widget>
|
||||||
|
</action-widgets>
|
||||||
|
</object>
|
||||||
|
</interface>
|
Reference in New Issue
Block a user