Kaydet (Commit) 380b2d2e authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: tdf#100340 make compress graphic dialog less wide

'regression' seems harsh, its not so wide it didn't fit on a reasonable sized
screen or look particularly horrific.

Change-Id: I20d55b8aac609ee0d683eb9a1c2b173aa0c9d8da
üst 6431f555
......@@ -63,6 +63,10 @@ private:
void Initialize();
DECL_LINK_TYPED( EndSlideHdl, Slider*, void );
DECL_LINK_TYPED( NewInterpolationModifiedHdl, ListBox&, void );
DECL_LINK_TYPED( NewQualityModifiedHdl, Edit&, void );
DECL_LINK_TYPED( NewCompressionModifiedHdl, Edit&, void );
DECL_LINK_TYPED( NewWidthModifiedHdl, Edit&, void );
DECL_LINK_TYPED( NewHeightModifiedHdl, Edit&, void );
DECL_LINK_TYPED( ResolutionModifiedHdl, Edit&, void );
......
......@@ -716,7 +716,7 @@ void ExportDialog::createFilterOptions()
if ((nQuality < 1 ) || (nQuality > 100))
nQuality = 75;
get(mpSbCompression, "compressionjpgsb");
get(mpNfCompression, "compressionjpgnf-nospin");
get(mpNfCompression, "compressionjpgnf");
mpSbCompression->SetRangeMin( 1 );
mpSbCompression->SetRangeMax( 100 );
mpNfCompression->SetMin( 1 );
......@@ -734,7 +734,7 @@ void ExportDialog::createFilterOptions()
nCompression = 6;
get(mpSbCompression, "compressionpngsb");
get(mpNfCompression, "compressionpngnf-nospin");
get(mpNfCompression, "compressionpngnf");
mpSbCompression->SetRangeMin( 1 );
mpSbCompression->SetRangeMax( 9 );
mpNfCompression->SetMin( 1 );
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkAdjustment" id="adjustment1">
......@@ -334,7 +334,7 @@
<property name="can_focus">False</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkSpinButton" id="compressionjpgnf-nospin">
<object class="GtkSpinButton" id="compressionjpgnf">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
......@@ -397,7 +397,7 @@
<property name="can_focus">False</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkSpinButton" id="compressionpngnf-nospin">
<object class="GtkSpinButton" id="compressionpngnf">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="invisible_char"></property>
......
......@@ -112,6 +112,8 @@ void CompressGraphicsDialog::Initialize()
m_pInterpolationCombo->SelectEntry( "Lanczos" );
m_pInterpolationCombo->SetSelectHdl( LINK( this, CompressGraphicsDialog, NewInterpolationModifiedHdl ));
m_pMFNewWidth->SetModifyHdl( LINK( this, CompressGraphicsDialog, NewWidthModifiedHdl ));
m_pMFNewHeight->SetModifyHdl( LINK( this, CompressGraphicsDialog, NewHeightModifiedHdl ));
......@@ -124,7 +126,11 @@ void CompressGraphicsDialog::Initialize()
m_pReduceResolutionCB->SetToggleHdl( LINK( this, CompressGraphicsDialog, ToggleReduceResolutionRB ) );
m_pQualitySlider->SetLinkedField(m_pQualityMF);
m_pQualitySlider->SetEndSlideHdl( LINK( this, CompressGraphicsDialog, EndSlideHdl ));
m_pCompressionSlider->SetLinkedField(m_pCompressionMF);
m_pCompressionSlider->SetEndSlideHdl( LINK( this, CompressGraphicsDialog, EndSlideHdl ));
m_pQualityMF->SetModifyHdl( LINK( this, CompressGraphicsDialog, NewQualityModifiedHdl ));
m_pCompressionMF->SetModifyHdl( LINK( this, CompressGraphicsDialog, NewCompressionModifiedHdl ));
m_pJpegCompRB->Check();
m_pReduceResolutionCB->Check();
......@@ -290,6 +296,8 @@ void CompressGraphicsDialog::Compress(SvStream& aStream)
IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, NewWidthModifiedHdl, Edit&, void )
{
fprintf(stderr, "NewWidthModifiedHdl\n");
m_dResolution = m_pMFNewWidth->GetValue() / GetViewWidthInch();
UpdateNewHeightMF();
......@@ -297,6 +305,28 @@ IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, NewWidthModifiedHdl, Edit&, void
Update();
}
IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, EndSlideHdl, Slider*, void )
{
Update();
}
IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, NewInterpolationModifiedHdl, ListBox&, void )
{
Update();
}
IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, NewQualityModifiedHdl, Edit&, void )
{
m_pQualitySlider->SetThumbPos(m_pQualityMF->GetValue());
Update();
}
IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, NewCompressionModifiedHdl, Edit&, void )
{
m_pCompressionSlider->SetThumbPos(m_pCompressionMF->GetValue());
Update();
}
IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, NewHeightModifiedHdl, Edit&, void )
{
m_dResolution = m_pMFNewHeight->GetValue() / GetViewHeightInch();
......@@ -322,6 +352,7 @@ IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, ToggleCompressionRB, RadioButton&
m_pCompressionSlider->Enable(choice);
m_pQualityMF->Enable(!choice);
m_pQualitySlider->Enable(!choice);
Update();
}
IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, ToggleReduceResolutionRB, CheckBox&, void )
......@@ -331,6 +362,7 @@ IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, ToggleReduceResolutionRB, CheckBo
m_pMFNewHeight->Enable(choice);
m_pResolutionLB->Enable(choice);
m_pInterpolationCombo->Enable(choice);
Update();
}
IMPL_LINK_NOARG_TYPED( CompressGraphicsDialog, CalculateClickHdl, Button*, void )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment