Skip to content

Add the reviewed RTL-binding changes by Fahad#249

Open
aoloe wants to merge 3 commits intoHOST-Oman:rtlBindingfrom
aoloe:rtl-binding
Open

Add the reviewed RTL-binding changes by Fahad#249
aoloe wants to merge 3 commits intoHOST-Oman:rtlBindingfrom
aoloe:rtl-binding

Conversation

@aoloe
Copy link

@aoloe aoloe commented Nov 25, 2025

A pull request with the changes I'm proposing to your patch.

The pull request is mainly for you to understand what changes I have made.

My "anti-patch" is in

https://bugs.scribus.net/view.php?id=14544#c53304

@Fahad-Alsaidi
Copy link
Contributor

Hi @aoloe , unfortunately I couldn't compile it at leat on my linux machine. Could you please have a look?

@aoloe
Copy link
Author

aoloe commented Nov 29, 2025

You're right, when resolving the merge conflicts I've overseen some parts that were not conflicting but were merged incorrectly.

Now it compiles and should match the patch I've uploaded to the Scribus bug tracker.

I'm also adding inline the questions I've written in the ticket.

maxXPos = qMax(maxXPos, page->xOffset()+page->width()+m_docPrefsData.displayPrefs.scratch.right());
maxYPos = qMax(maxYPos, page->yOffset()+page->height()+m_docPrefsData.displayPrefs.scratch.bottom());
}
if (rtlBinding == 1)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the reason for adding this?
In my tests, it seems to work correctly without.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I don't remember but I am sure it was for a case to enforce invalid stat on the doc so it can redraw again. I couldn't reproduce the case. So we can assume the removing it is fine for now .

@Fahad-Alsaidi
Copy link
Contributor

the naming BindingDirection var to docBindingDirection just for readability since it is related to scribus doc not the Scribus itself.

Copy link
Contributor

@Fahad-Alsaidi Fahad-Alsaidi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great @aoloe I am learning new things from you. Thanks.


ScribusDoc* doFileNew(double width, double height, double topMargin, double leftMargin, double rightMargin, double bottomMargin, double columnDistance, double columnCount, bool autoTextFrames, int pageArrangement, int unitIndex, int firstPageLocation, int orientation, int firstPageNumber, const QString& defaultPageSize, bool requiresGUI, int pageCount = 1, bool showView = true, int marginPreset = 0, int
docBindingDircetion = 0);
ScribusDoc* newDoc(double width, double height, double topMargin, double leftMargin, double rightMargin, double bottomMargin, double columnDistance, double columnCount, bool autoTextFrames, int pageArrangement, int unitIndex, int firstPageLocation, int orientation, int firstPageNumber, const QString& defaultPageSize, bool requiresGUI, int pageCount = 1, bool showView = true, int marginPreset = 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it safe to remove newDoc function? not related to RTL binding

if (rtlBinding)
{
counter = counter == 1 ? 0 : 1;
currentXPos += m_docPrefsData.docSetupPrefs.pageWidth
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this makes things difficult to read but shorter 👍

@aoloe
Copy link
Author

aoloe commented Nov 30, 2025

Just a warning: I'm not 100% sure that this PR is the same as the patch in the bug tracker.

I've created the PR to make it easier for you to understand which changes I've made.
But what counts is the patch in the bug tracker.

@Fahad-Alsaidi
Copy link
Contributor

Just a warning: I'm not 100% sure that this PR is the same as the patch in the bug tracker.

I've created the PR to make it easier for you to understand which changes I've made. But what counts is the patch in the bug tracker.

it will be great, if we can work on one repo and we finish fixing all bugs submit one patch in the bug tracker. However, do what you like... Thanks for the reviewing my patch and adding new features.

@aoloe
Copy link
Author

aoloe commented Nov 30, 2025

It's ok for me to work on a common repo, but I would not start from the branch you have created.
It's too hard for me, to check that all my changes are correctly merged.

I would now start from the current master and apply Martin's latest patch to it.
If you create that branch (rtlBindingReview?), it's likely that Martin and myself will use it as a base.
Sadly, Craig and Jean won't want to access it, and we will need to keep on also posting diff files to the bug tracker.

@Fahad-Alsaidi
Copy link
Contributor

@aoloe ok i will do it but i will make the branch (rtlBindingReview?) in scribus repo so you will have full access to it directly. Is it fine with you? or you prefer in scribus host repo?

@aoloe
Copy link
Author

aoloe commented Dec 4, 2025

The Scribus repo on Github is just a mirror.
I prefer not to have further branches in there.

I have now created a new repo "scribus-dev" in the Scribusproject on Github:

  • with a master that is kept in sync with upstream
  • with an rtl-binding branch out of its master
  • with a pull request for Martin's latest patch
  • i've already accepted (or will soon) that pull request into the rtl-binding branch
  • in the future we don't modify the rtl-binding branch, but create pull request that will get approved from a different person than the one proposing the change (review of the changes).
  • for that, the simplest way is to fork the scribus-dev repo in your own Github account, clone that repo and work on branches created out of the local rt-binding branch...
  • (i hope it's not too complex... with git, everything is possible, but sometimes not so friendly...)

Is it fine this way?

@aoloe
Copy link
Author

aoloe commented Dec 4, 2025

I've now added Martin's changes

scribusproject/scribus-dev#1

and created a draft documentation for using the scribus-dev repository:

https://github.com/aoloe/scribus-manual-development/blob/master/content/github-collaboration-en.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants