-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Right to Left capability to Telegram for languages like arabic, urdu and persian #24467
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use comments in the same way the comments appear in existing code:
// This is a comment.
p.thisIsMethod();
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
by adding another parameter with default value of -1 to avoid breaking of the current experience it can adjust position in rtl mode. Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
Signed-off-by: AmirReza_Ashouri <[email protected]>
# Conflicts: # Telegram/SourceFiles/dialogs/ui/dialogs_layout.cpp Signed-off-by: AmirReza_Ashouri <[email protected]>
…o rtl-telegram
Why did snap ubuntu build fail?? |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
I have resolved issues you mentioned in my code. Is there any problem in my code yet? |
rtl() | ||
? p.drawImage(fullWidth - st::dialogsPadding.x() - st::dialogsPhotoSize, st::dialogsPadding.y(), _cornerBadgeUserpic->frame) | ||
: p.drawImage(st::dialogsPadding, _cornerBadgeUserpic->frame); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rtl() | |
? p.drawImage(fullWidth - st::dialogsPadding.x() - st::dialogsPhotoSize, st::dialogsPadding.y(), _cornerBadgeUserpic->frame) | |
: p.drawImage(st::dialogsPadding, _cornerBadgeUserpic->frame); | |
p.drawImage( | |
rtl() | |
? fullWidth - st::dialogsPadding.x() - st::dialogsPhotoSize | |
: st::dialogsPadding.x(), | |
st::dialogsPadding.y(), | |
_cornerBadgeUserpic->frame); |
@@ -77,7 +81,8 @@ void PaintRowDate(Painter &p, QDateTime date, QRect &rectForName, bool active, b | |||
return lastDate.toString(cDateFormat()); | |||
} | |||
}(); | |||
PaintRowTopRight(p, dt, rectForName, active, selected); | |||
//paints dialogs last message date on each row | |||
PaintRowTopRight(p, dt, rectForName, active, selected, outerw); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PaintRowTopRight(p, dt, rectForName, active, selected, outerw); | |
PaintRowTopRight(p, dt, rectForName, active, selected, outerw); |
(rtl() | ||
? unreadLeft | ||
: unreadRight), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(rtl() | |
? unreadLeft | |
: unreadRight), | |
(rtl() ? unreadLeft : unreadRight), |
(rtl() | ||
? unreadLeft | ||
: unreadRight), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(rtl() | |
? unreadLeft | |
: unreadRight), | |
(rtl() ? unreadLeft : unreadRight), |
(rtl() | ||
? fullWidth - nameleft - availableWidth | ||
: nameleft), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(rtl() | |
? fullWidth - nameleft - availableWidth | |
: nameleft), | |
(rtl() ? (fullWidth - nameleft - availableWidth) : nameleft), |
(rtl() | ||
? (width() - _thirdSection->width()) | ||
: _thirdSection->x()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(rtl() | |
? (width() - _thirdSection->width()) | |
: _thirdSection->x()), | |
(rtl() ? (width() - _thirdSection->width()) : _thirdSection->x()), |
newWidth = rtl() | ||
? width() - newWidth | ||
: newWidth; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newWidth = rtl() | |
? width() - newWidth | |
: newWidth; | |
newWidth = rtl() ? (width() - newWidth) : newWidth; |
newWidth = rtl() | ||
? (width() - newWidth) | ||
: newWidth; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newWidth = rtl() | |
? (width() - newWidth) | |
: newWidth; | |
newWidth = rtl() ? (width() - newWidth) : newWidth; |
auto x = (rtl() | ||
? rectForName.right() - qMin(nameWidth + st::dialogsScamSkip, rectForName.width() - width) - width | ||
: rectForName.x() + qMin(nameWidth + st::dialogsScamSkip, rectForName.width() - width)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auto x = (rtl() | |
? rectForName.right() - qMin(nameWidth + st::dialogsScamSkip, rectForName.width() - width) - width | |
: rectForName.x() + qMin(nameWidth + st::dialogsScamSkip, rectForName.width() - width)); | |
const auto minWidth = std::min( | |
nameWidth + st::dialogsScamSkip, | |
rectForName.width() - width); | |
const auto x = rtl() | |
? (rectForName.x() + rectForName.width() - minWidth - width) | |
: (rectForName.x() + minWidth); | |
st::connectingLeftShadow.paint(p, right, width()); | ||
st::connectingLeft.paint(p, right, width()); | ||
st::connectingRightShadow.paint(p, left, width()); | ||
st::connectingRight.paint(p, left, width()); | ||
} else { | ||
st::connectingLeftShadow.paint(p, left, width()); | ||
st::connectingLeft.paint(p, left, width()); | ||
st::connectingRightShadow.paint(p, right, width()); | ||
st::connectingRight.paint(p, right, width()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
st::connectingLeftShadow.paint(p, right, width()); | |
st::connectingLeft.paint(p, right, width()); | |
st::connectingRightShadow.paint(p, left, width()); | |
st::connectingRight.paint(p, left, width()); | |
} else { | |
st::connectingLeftShadow.paint(p, left, width()); | |
st::connectingLeft.paint(p, left, width()); | |
st::connectingRightShadow.paint(p, right, width()); | |
st::connectingRight.paint(p, right, width()); | |
st::connectingLeftShadow.paint(p, rtl() ? right : left, width()); | |
st::connectingLeft.paint(p, rtl() ? right : left, width()); | |
st::connectingRightShadow.paint(p, rtl() ? left : right, width()); | |
st::connectingRight.paint(p, rtl() ? left : right, width()); |
No description provided.