Resizing the completed figure in inkscape - inkscape

i have made a figure in inkscape and realized that is a landscape orientation with width 608 and height 495. The problem is that i want to make it ready for publication and ideally i want it in portrait orientation and much smaller. I see here in Document Properties that the size for A4 is 210x297. Can somebody tell me how i can accomplish this task?
thanks in advance

You are on the right path. Go to Menu.
File > Document Properties
And you can change the size of your design by setting the custom value in the Custom Size option in Document Properties Window. If you wish you can also change the unit in which you want to work. For your reference, I am attaching a screenshot.

Related

ChartJS charts width and height set to 0 when responsive and dragged. Any ideas as to why?

I am in the process of building a dashboard with multiple charts on it. For a chart library I've landed on VueChartJS, with the vue-chart-3 wrapper and for a drag n drop library I'm using vue-draggable-next.
The issue I'm having is that if the charts have the responsive option as true and you drag them, their height and width are set to 0. I added a toggle to prove that it's an issue with the responsive feature, but is there anything else I can do to remedy this issue?
Right now I'm wondering if I need to make some invisible toggle that activates every time you click the chart to drag it around and then toggles off when you are done dragging, but that seems like a lot of potential code and time to impliment this feature and wonder if there's not just a better way to do this?
Any advice or help would be greatly appreciated!
I've made a CodeSandbox to show the issue and there is a gif below as well showing what is happening.

qt on Mac: Form Layout fails to stretch horizontally

I'm still trying to do some pretty basic stuff with qt, and it's been a struggle. I'm specifically targeting for Mac. My current problem is getting the forms to not suck.
The simple problem. Create a new MainWindow app. Go into the Qt Creator (open Forms -> mainwindow.ui).
Drag 3 labels into place. Then I dragged 2 Line Edits and for fun, a Dial, but that part probably doesn't matter.
Click the main window and then tell it to use Form Layout. Within Qt Creator if I resize the window, my various line edits expand to fill the available space, exactly like I want.
Run the app. All the line edit fields are a fixed length, very short (if I don't override their minimum width), and do NOT resize as I resize the window.
Three quarters of the reason to use Form Layout is for resizing capability.
I've tried clicking on the central widget before setting to Form Layout: no change in behavior.
I do get reasonable behavior if I use a grid layout, although I have to add a vertical spacer at the bottom or my dial resizes crazily as I play with the window size.
So... Am I just doing something wrong with Form Layout? Or does it not work well on Mac and I should use Grid Layout instead?
I really miss Motif's XmFormLayout. It took time to set all the constraints, but I could make my forms do exactly what I wanted. Ah, but so 1990s.
On the panel to the right where you can see the objects, click the centralWidget. In the property panel, scroll down until you get to the layout properties of the form layout. Set the layoutFieldGrowthPolicy to ExpandingFieldsGrow.
By default, the line edits are not growing to fill the available space on macOS because they are not supposed to. This is some sort of macOS UI guideline. QFormLayout follows the platform conventions by default.
It would also be nice if I can figure out how to NOT necessarily expand everything to full width. I have a few Line Edit widgets that I'd like to keep short. They're going to hold TCP port numbers.
For those, set the Horizontal Policy property (it's grouped inside the sizePolicy property group in the properties panel) of the affected line edits to something suitable. In this case, probably to Fixed, but look up the documentation first of what each setting does.

Set a scale for a background-image

I just created a resource file for my project, which got 5 prefixes (Window, background, etc).
My main problem is that, when using the Qt Designer, I go to stylesheet, open it up, Add resource -> background-image.
Unfortunately my picture is way too big for my window, and I can't seem to put it to scale using designer.
After reading some topics on the forums, I have tried to put this in the "stylesheet edit" :
background-image: url(:/background/Backgrounds/Fondecran1.jpg) 0 0 0 0 stretch stretch;
in place of
background-image: url(:/background/Backgrounds/Fondecran1.jpg);
Can anyone help me put it to scale ?
Is there a way it can "adapt" as well as it can to changes in the window size ?
Thank you all in advance for your answers.
Instead you may need to use border-image.
Look into the below content in the link provided.
A background-image does not scale with the size of the widget. To provide a "skin" or background that scales along with the widget size, one must use border-image. Since the border-image property provides an alternate background, it is not required to specify a background-image when border-image is specified. In the case, when both of them are specified, the border-image draws over the background-image.
http://doc.qt.io/qt-5/stylesheet-customizing.html

how to make title in TOCropViewController CocoaPod?

I need to add a title bar named "Crop Image" in this Cocoapod.
Please help me
I'm the developer of TOCropViewController. :)
There's no feature in the library at the moment to display text above the cropping content right now. But it would be fairly trivial to add a UILabel to the view and position it near the top of the view.
The challenge is that you'd then need to account for it when the device is rotated sideways. At the moment, the cropping content will fill the entire height of a horizontal device, so you'd need to override that to account for the text.
It's been a while since I wrote it, but I did include a property in the vertical layout code to add padding to the top of the view controller, so it SHOULD be relatively easy.
I sadly don't have time to add it myself, but I made an issue on the repo and added the pr requested tag. Hopefully someone with more free time than I do can add it. :)

How to determine the content step value of scrollarea

I'm making my own UI from scratch using OpenGL that is why I'm asking this and please don't make any discouragement as this is just a hobby project.
Currently, I'm stuck implementing how this scrollbars really work. In my current implementation, the content scrolls at the wrong step value as well as the thumb, meaning, I set the value manually like 1px step for each of them.
The structure of my scrollbar implementation is describe as follows:
I draw scrollbars i.e the main rectangle where the 3 button lies.
Those 3 buttons are, thumb, buttonBack and buttonNext.
All of them do the basic logic of scrollbars i.e when I click each one of them, they moved. But the whole part(scrollbar) don't know how to scroll contents
So what I did is: I make another object and I call it scrollarea
It has two scrollbars, vertical and horizontal scrollbar.
I made a function called scrollToX and scrollToY which
does what I named to them.
But the step values I set to them are
manually set up.
I try to google some scrollbar, scrollarea, scrollview or whatever you call to that scrollable rectangle thing, but all I see are implementation and I cannot find any guides how to build your own. I have no choice but to look at their implementation. I try my best to comprehend what they did but their implementation of how their whole UI structure is very different to mine, and I cannot find anything useful there.
So I ask again here if anybody can explain me well how to make a properly functional scrollbar.
Most specific things I'm really concerned of are:
How do I determine the thumb step value?
How do I determine the content step value?
All of these depend on your content -
Is it just an image ? If so, you only need to change the offset depending on the size of the image.
Is it a list of values like in Windows explorer ? Then you need to create a data structure first that contains all of it, and shows the content that fits within the window as it scrolls.
OpenGL does not fit into this discussion.