Mantis Issue Tracking for Scribus
· Hosting provided by / Øverby Consulting ·

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006230ScribusGraphics / Image Framespublic2007-09-17 21:382015-11-05 13:26
Assigned To 
PlatformIndependentOSIndependentOS VersionIndependent
Product Version 
Target Version1.6 milestoneFixed in Version 
Summary0006230: Feature request: alignment of images within an image frame
DescriptionWhen an image is smaller than it's frame, it would be fine to align the image automatically inside the frame: for example, align the image horizontal and / or vertical inside the frame, align it to the right border of the frame etc.

At the moment, this functionality can achieved by a script: [^]
Attached Filesdiff file icon alignImage.diff [^] (10,087 bytes) 2015-10-27 22:55 [Show Content]
diff file icon alignImageUpdated.diff [^] (8,950 bytes) 2015-10-28 07:45 [Show Content]
zip file icon [^] (2,125 bytes) 2015-10-29 00:26
png file icon image-align-screenshot.png [^] (77,867 bytes) 2015-10-29 00:26

gif file icon image-align.gif [^] (125,117 bytes) 2015-10-29 16:58

- Relationships
related to 0006228closed Feature requests for image frames 
related to 0005662acknowledged Positioning of image within image frames. 

-  Notes
jon.grossart (reporter)
2014-02-09 04:57

This is a really old request, that seems like a very basic feature for a DTP program to have.

Use Case: brochures
If I've setup guides to cover the printable space, it would be nice to just expand the text frame to the sides and set an "image centered" property so that I can guarantee the spacing without have to resort to the calculations or using a script.
ale (manager)
2014-09-19 10:28

i'm for adding this feature to the align and distribute dialog.
Dawoodalbadi (reporter)
2015-10-26 10:46

hello guys
I am working in this feature or something similar but I got lost in some points if any one can help me

what I did exactly that I add new combobox in PropertiesPalette_Image that will have 9 option (top-left , top-middle , botton-right ... etc) according to the choice the image will move in the frame to the new x and new y coordinate , the problem is calculating the new x,y. for that I will need width and hight for the image and the frame. so I stop their for a moment. if any one can help how to get the width and hight for the both image and frame
Dawoodalbadi (reporter)
2015-10-27 22:54

hello again
i finish this feature
my work is as following
i add 2 combo box for alignment
first one is vertical which has three options (top ,center,bottom)
the second is horizontal which has also 3 options (left , center ,right )
if the image is smaller than the frame so you can move it by these options
the new options is in property >>> image >>> align image

thank you
cbradney (administrator)
2015-10-27 23:35

When I load the scribus splashscreen into an image frame, it doesn't center vertically and doesnt go to the bottom of the frame either. Center horizontal mightbe ok, but right horizontall is again off.

Typo in Horizontal in GUI.

There's issues with the selection of Default. I assume it should return the image to the top left but it doesn't.

Also, I think the controls might need to be nearer to the X/Y position to understand that it just updates those values.

Also, the case where an image has been scaled needs to be handled properly, by using the scaled width.

Thanks for the patch, let's see how the next revision is.
Dawoodalbadi (reporter)
2015-10-27 23:59

Thank you mr cbradny
I dont know why the options doesn't work properly with u ... i try it in to 2 different machines and it works fine but i will check it again and about other points i totally agree with u
I will try to fix it soon
Thank you
cbradney (administrator)
2015-10-28 00:18

I suspect that it relates to the height/width calculation .. see documentchecker.cpp isPartFilledImageFrame() for some hints.
Dawoodalbadi (reporter)
2015-10-28 07:42
edited on: 2015-10-28 07:50

sorry I was not understanding what you are meaning last night but now I know
I did handle scale properly in updated patch and I change the location of the alignment control as you request and I made some changes in code layout it looks nice now
I hope there will be no problems now
thank you

TomZ (reporter)
2015-10-28 08:39

Nice to see that someone is taking care of these old issues ;-)

I will test the next days!
ale (manager)
2015-10-29 00:26

i have the feeling that they work correctly.

but i really would prefer to have buttons rather than drop downs...

i've added a mock up of it and a zip containing a first possible version of the icons for 1.5.1 (and i would let dezso or another designer create the definitive icons)
ale (manager)
2015-10-29 00:28

btw, i still would prefer to have the buttons in the align and distribute dialog...

and when the user is in image edit mode the align and distribute dialog should show only one tab with the above attached buttons...
Dawoodalbadi (reporter)
2015-10-29 04:14
edited on: 2015-10-29 05:22

I agree that bottons will be very nice but I am zero in xml language
I will try to change it if I success I will update the patch
Thank you ale

Kunda (manager)
2015-10-29 05:13

This feature is awesome!
I totally agree that these should be buttons and not dropdowns.
Lets make that happen!
Dawoodalbadi (reporter)
2015-10-29 05:46
edited on: 2015-10-29 05:47

I discuss the design with someone and he says that droplist is better than the bottons so I need to know what is the opinion of core developers , please informe me or make a note in mailling list to agreed about the final design before i change it

ale (manager)
2015-10-29 08:47

i would be interested in kwnowing why the other person is preferring the drop down list.

my rational for the buttons:

i would use drop downs for selecting a type of alignement for the image. a property that is then stored in the frame properties.

but here we are just sending the frame content to one of the directions (top, bottom, left, right, center) and the user is then free to further move the content.

the button should not be in pushed down state afte they have been used. it's just an action, you're not setting a property.

it's exactly the same as one is doing in "windows > align and distribute" and it should IMO work in the same way.

i would even go further and say that this function should be in the "align and distribute" dialog. but we can further move it later, if we want to do so.

conerning the editing of the .ui file: i don't know this spcific file, but generally, it's better to modify them by using the designer part of qtcreator (the IDE relating to Qt).
directly editing the xml file is fine for small changes... but, as you noticed, can get pretty tedious...
ale (manager)
2015-10-29 11:45

ps: if testers have the scribus github repository cloned you can try:

git fetch origin pull/32/head:pr-32
git checkout pr-32

to get the patch in a new local branch called pr-32 with the patch i've applied from dawoodalbadi.
Kunda (manager)
2015-10-29 16:54

Dawood, found an issue with the patch:

1) Open an image frame

2a) Make the image frame larger than the image itself in the vertical plane
3a) Click Vertical > Middle OR Vertical > Bottom
4a) Click Vertical > None
Image has disaapeared (Click Vertical > 'Top' for image to return)


2b) Make the image frame larger than the image itself in the horizontal plane
3b) Click Horizontal > Center OR Horizontal > Left
4b) Click Horizontal > None
Image doesn't dissappear but it doesn't respond correctly
Kunda (manager)
2015-10-29 16:58

I also added a screencast of the overal feature in action so people can see it in action (not the bug I found)
Vladimir Savic (reporter)
2015-10-29 17:57

My vote goes for including this functionality in Align&Distribute dialog.
cbradney (administrator)
2015-10-30 07:23

Also, what scenario would someone have to not have the frame resized back down to the image size? I can think of some forced wrapping of text scenarios but I'm not sure this function even makes sense to include.
ale (manager)
2015-10-30 22:14

mmm... i don't see why aligning the image to the frame should reset the image size.

i think that one of the guys shouting for this function was doing a catalog and he might have been working this way:

- resize the image until it fits horizontally
- align the image to the bottom of the frame
Dawoodalbadi (reporter)
2015-10-31 06:54

I am willing to work in this patch again at the end of next week
So far i will change the control from menu to bottons and i will see the bug that kunda discover
If you have another problems tell me
Also if you think there is a need for other function like resize image tell me
And finally if you think this batch is not necessary or no need for it please inform me i will not wast my time on it

ale (manager)
2015-11-03 13:30

craig, i thought again about what you wrote and i guess that: yes, somebody could achieve most tasks by resizing the frame to the image frame.

but not all of them.

as an example, "adjust frame to image" does not fit (correctly) when the image is not completely shown.

for others -- like in the catalog example -- it is more a faster way to get to the goal...
ale (manager)
2015-11-03 15:04

@dawoodalbadi: if craig agrees with the the function being useful, please implement it as buttons in the properties palette.

as vlada notes, this function belongs in the align and distribute window (where, obviously, it would be implemented as buttons!) and we should move it there at some time (if possible before or during the transition to the new properties palette).

- Issue History
Date Modified Username Field Change
2007-09-17 21:38 TomZ New Issue
2007-09-17 21:39 cbradney Relationship added related to 0006228
2007-09-17 23:33 christoph_s Status new => acknowledged
2008-02-05 19:51 christoph_s Relationship added related to 0005662
2014-02-09 04:57 jon.grossart Note Added: 0031288
2014-07-14 18:09 Kunda Target Version => 1.6 milestone
2014-09-19 10:28 ale Note Added: 0033756
2015-09-17 22:10 Kunda Category Graphics / Image Frames => Graphics/Img Frames
2015-09-17 22:11 Kunda Category Graphics/Img Frames => Graphics / Image Frames
2015-10-25 14:47 Khaled Hosny Tag Attached: HOST-Oman
2015-10-25 14:48 Khaled Hosny Tag Detached: HOST-Oman
2015-10-26 10:46 Dawoodalbadi Note Added: 0036943
2015-10-26 10:51 Dawoodalbadi Tag Attached: HOST-Oman
2015-10-27 22:54 Dawoodalbadi Note Added: 0036998
2015-10-27 22:55 Dawoodalbadi File Added: alignImage.diff
2015-10-27 23:35 cbradney Note Added: 0037001
2015-10-27 23:37 Kunda Patch => Yes
2015-10-27 23:59 Dawoodalbadi Note Added: 0037004
2015-10-28 00:18 cbradney Note Added: 0037006
2015-10-28 07:42 Dawoodalbadi Note Added: 0037019
2015-10-28 07:45 Dawoodalbadi File Added: alignImageUpdated.diff
2015-10-28 07:50 Dawoodalbadi Note Edited: 0037019 View Revisions
2015-10-28 08:39 TomZ Note Added: 0037020
2015-10-29 00:26 ale Note Added: 0037063
2015-10-29 00:26 ale File Added:
2015-10-29 00:26 ale File Added: image-align-screenshot.png
2015-10-29 00:28 ale Note Added: 0037064
2015-10-29 04:14 Dawoodalbadi Note Added: 0037071
2015-10-29 05:13 Kunda Note Added: 0037072
2015-10-29 05:22 Dawoodalbadi Note Edited: 0037071 View Revisions
2015-10-29 05:46 Dawoodalbadi Note Added: 0037076
2015-10-29 05:47 Dawoodalbadi Note Edited: 0037076 View Revisions
2015-10-29 08:47 ale Note Added: 0037084
2015-10-29 11:45 ale Note Added: 0037089
2015-10-29 16:54 Kunda Note Added: 0037102
2015-10-29 16:58 Kunda Note Added: 0037103
2015-10-29 16:58 Kunda File Added: image-align.gif
2015-10-29 17:57 Vladimir Savic Note Added: 0037106
2015-10-30 07:23 cbradney Note Added: 0037118
2015-10-30 22:14 ale Note Added: 0037127
2015-10-31 06:54 Dawoodalbadi Note Added: 0037131
2015-11-03 13:30 ale Note Added: 0037178
2015-11-03 15:04 ale Note Added: 0037183
2015-11-05 13:26 Kunda Sticky Issue No => Yes

Copyright © 2000 - 2015 MantisBT Team
Powered by Mantis Bugtracker