Skip to content
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

QTableViewCell sizeWithMargin properly calculates margin #569

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bartvandendriessche
Copy link
Contributor

Here are some highlighted before and after shots;

Before:
ios simulator screen shot 23 sep 2013 18 24 50
ios simulator screen shot 23 sep 2013 18 24 52

After:
ios simulator screen shot 23 sep 2013 18 26 14
ios simulator screen shot 23 sep 2013 18 26 18

Should resolve issue #545

@bartvandendriessche
Copy link
Contributor Author

Hm actually that's still off-center by a few points.

@bartvandendriessche
Copy link
Contributor Author

I had to change the margin constants slightly to make things center properly.

If you want to use margins that are different from the default iOS ones, you can't reuse self.textLabel.frame.origin.x.

I had a version where I used the kCellMargin constant to determine the x offset for the textLabel, but that messed up the layout once the cell is assigned an image (QuickDialog reuses part of the iOS layoutSubviews method).

@rock007
Copy link

rock007 commented Oct 24, 2013

not work

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