Index: scribus/ui/propertiespalette_image.cpp
===================================================================
--- scribus/ui/propertiespalette_image.cpp (revision 20473)
+++ scribus/ui/propertiespalette_image.cpp (working copy)
@@ -110,6 +110,9 @@
connect(renderIntent , SIGNAL(activated(int)) , this, SLOT(handleIntent()));
connect(compressionMethod , SIGNAL(activated(int)) , this, SLOT(handleCompressionMethod()));
connect(compressionQuality , SIGNAL(activated(int)) , this, SLOT(handleCompressionQuality()));
+ connect(alignvertical , SIGNAL(currentIndexChanged(int)) , this, SLOT(alignImageVertical(int)));
+ connect(alignhorozintal , SIGNAL(currentIndexChanged(int)), this, SLOT(alignImageHorozintal(int)));
+
}
void PropertiesPalette_Image::changeEvent(QEvent *e)
@@ -890,4 +893,59 @@
}
}
+void PropertiesPalette_Image::alignImageVertical(int in){
+ double imagex,imagey,heightf ,heightim;
+ //imagex = m_item->pixm.imgInfo.xres();
+
+ if (!m_ScMW || m_ScMW->scriptIsRunning())
+ return;
+ if ((m_haveDoc) && (m_haveItem) && (m_item->asImageFrame()))
+ {
+
+ // widthim = m_item->pixm.width();
+ heightim = m_item->pixm.height();
+ // widthf = m_item->width();
+ heightf = m_item->height();
+
+ if (in == 0);
+ else if (in == 1)imagey = 0;
+ else if (in == 2)imagey = (heightf- heightim)/2.0;
+ else imagey = heightf - heightim ;
+
+ imagex = m_item->imageXOffset();
+ m_doc->itemSelection_SetImageOffset(imagex, imagey);
+ m_item->update();
+
+ }
+ else ;//add error massage
+
+}
+void PropertiesPalette_Image::alignImageHorozintal(int in){
+ double imagex,imagey,widthf,widthim;
+ //imagex = m_item->pixm.imgInfo.xres();
+
+
+ if (!m_ScMW || m_ScMW->scriptIsRunning())
+ return;
+ if ((m_haveDoc) && (m_haveItem) && (m_item->asImageFrame()))
+ {
+
+ widthim = m_item->pixm.width();
+ //heightim = m_item->pixm.height();
+ widthf = m_item->width();
+ //heightf = m_item->height();
+
+ if (in == 0);
+ else if (in == 1)imagex = 0;
+ else if (in == 2)imagex = (widthf - widthim)/2.0;
+ else imagex = widthf - widthim ;
+
+ imagey = m_item->imageYOffset();
+ m_doc->itemSelection_SetImageOffset(imagex, imagey);
+ m_item->update();
+
+ }
+ else ; //add error message
+}
+
Index: scribus/ui/propertiespalette_image.h
===================================================================
--- scribus/ui/propertiespalette_image.h (revision 20473)
+++ scribus/ui/propertiespalette_image.h (working copy)
@@ -102,6 +102,8 @@
void handleImageEffects();
void handleExtImgProperties();
+ void alignImageVertical(int);
+ void alignImageHorozintal(int);
signals:
void UpdtGui(int);
Index: scribus/ui/propertiespalette_imagebase.ui
===================================================================
--- scribus/ui/propertiespalette_imagebase.ui (revision 20473)
+++ scribus/ui/propertiespalette_imagebase.ui (working copy)
@@ -6,8 +6,8 @@
0
0
- 286
- 617
+ 297
+ 682
@@ -17,9 +17,18 @@
2
-
+
2
+
+ 2
+
+
+ 2
+
+
+ 2
+
-
-
@@ -63,13 +72,6 @@
- -
-
-
- Y-Pos:
-
-
-
-
@@ -80,6 +82,13 @@
+ -
+
+
+ Y-Pos:
+
+
+
-
@@ -151,10 +160,10 @@
- -
-
+
-
+
- Actual X-DPI:
+ Actual Y-DPI:
@@ -161,10 +170,10 @@
-
- -
-
+
-
+
- Actual Y-DPI:
+ Actual X-DPI:
@@ -200,14 +209,88 @@
- -
-
+
-
+
- Proportional
+ Horozental
- -
+
-
+
+
-
+
+ Default
+
+
+ -
+
+ Top
+
+
+ -
+
+ Center
+
+
+ -
+
+ Bottom
+
+
+
+
+ -
+
+
-
+
+ Default
+
+
+ -
+
+ Left
+
+
+ -
+
+ Center
+
+
+ -
+
+ Right
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+
+ 11
+ 75
+ true
+
+
+
+ Align Image
+
+
+
+ -
+
+
+ Vertical
+
+
+
+ -
To Frame Size
@@ -214,6 +297,13 @@
+ -
+
+
+ Proportional
+
+
+
@@ -223,13 +313,6 @@
Color Management
- -
-
-
- Input Profile
-
-
-
-
@@ -250,6 +333,13 @@
-
+ -
+
+
+ Input Profile
+
+
+
@@ -327,6 +417,9 @@
-
+
+
+ -
Qt::Vertical
@@ -365,8 +458,6 @@
imgDpiY
keepImageWHRatioButton
keepImageDPIRatioButton
- frameScale
- cbProportional
inputProfiles
renderIntent
compressionMethod