summaryrefslogtreecommitdiff
path: root/svx/source/dialog/compressgraphicdialog.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-07-13 12:16:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2016-07-13 12:19:49 +0100
commit380b2d2e449eee1e794efa1b16b69289419a9a66 (patch)
treed4080146b7f3d38fbc79dd1331e6b1603e577c26 /svx/source/dialog/compressgraphicdialog.cxx
parent6431f5554bd585935e7a9bc354609a4363a09509 (diff)
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
Diffstat (limited to 'svx/source/dialog/compressgraphicdialog.cxx')
-rw-r--r--svx/source/dialog/compressgraphicdialog.cxx32
1 files changed, 32 insertions, 0 deletions
diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx
index 7dedc172fc18..9dcc2c561b23 100644
--- a/svx/source/dialog/compressgraphicdialog.cxx
+++ b/svx/source/dialog/compressgraphicdialog.cxx
@@ -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 )