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

UI improvements #3

Merged
merged 9 commits into from May 19, 2016
Merged

UI improvements #3

merged 9 commits into from May 19, 2016

Conversation

simmac
Copy link
Contributor

@simmac simmac commented May 10, 2016

There is still a lot to be done, but I tried to solve the worst UI problems.

@dbrgn
Copy link

dbrgn commented May 11, 2016

Looks much better than before!

Another suggestion: Would it be possible to make the bubbles only as high as necessary? Right now a single message is stretched vertically to fill the entire chat area, with a lot of whitespace in it.

@blizzard4591
Copy link
Owner

Would it be possible to make the bubbles only as high as necessary?

Sadly, that is not as easy as it sounds, because of the way Qt calculates the height of contents in the scrollable area.
I hope that with a simple HTML5 UI this will be a problem of the past.

<width>600</width>
<height>454</height>
<width>561</width>
<height>400</height>
Copy link
Owner

Choose a reason for hiding this comment

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

Is this change intentional?

@blizzard4591
Copy link
Owner

blizzard4591 commented May 11, 2016

Wow, this looks much better.
A few small issues:

  • Messages from oneself (or at least their time/from line) are clipped by the rounded corner.
  • If the windows is not wide enough, the time/from line wraps, but only one line is ever displayed.

@simmac
Copy link
Contributor Author

simmac commented May 11, 2016

@blizzard4591

Is this change intentional?

Not really, I reverted it. I tried to make the window smaller, but for some reason I can't resize it to less than 1058px on OS X. Do you have any idea?

Messages from ownself (or at least their time/from line) are clipped by the rounded corner.

Could you show me a screenshot? On my OS X machine, I can't reproduce this.

If the windows is not wide enough, the time/from line wraps, but only one line is ever displayed.

Should be fixed now (?) but I can't test it because, as I said, I can't make the window small enough.

@blizzard4591
Copy link
Owner

blizzard4591 commented May 11, 2016

openmittsubugpullreq3

Ahh, I stand corrected - the issue is not the rounded corner, but instead it looks like Qt is not calculating the width correctly for the italic font?!
To me, the "Sent" looks a bit off, as if the "t" has been cut off.

@simmac
Copy link
Contributor Author

simmac commented May 11, 2016

Oh, I see now.
Maybe this is helpful: https://stackoverflow.com/questions/23737591/qpainter-drawtext-italic-writes-outside-of-the-rectangle
If you have an idea, let me know, otherwise I'll try to somehow work around this soon.

@dbrgn
Copy link

dbrgn commented May 12, 2016

By the way, why aren't you using QML? (This is a real question, not a critique, I never worked with "classic" QT or QML before.)

@simmac
Copy link
Contributor Author

simmac commented May 12, 2016

Hmm, thanks to @KL7000F I just realized text wrapping doesn't really work as intended. On my OS X machine, long text just gets cut at line end and not wrapped around at all.
On Ubuntu , the text wraps at line end, but it somehow the text gets cut off after two lines but expands again after a new message is shown under the current message (that's what @KL7000F sent me).

@KL7000F
Copy link

KL7000F commented May 12, 2016

Here is a Screenshot from Ubuntu that shows the error:
openmittsu
Thanks @simmac

@blizzard4591
Copy link
Owner

Take a look at the changes in https://github.com/blizzard4591/openMittsu/tree/uiEditBySimmacPullReq3

This should fix the font issues. Still investigating on the Line Break/Resize stuff.

* Switched to native menu bar on Mac OS.

* Fixed issue with italic font going out of bounds (by adding a space at the end).
Enabled word wrap on Location and textchatwidgetitem.
@blizzard4591
Copy link
Owner

Meh, just realized that this probably does not fix every issue. If the line gets wrapped, all wrapped lines will still be cut off.
Margin and Padding do not work here, since they are "outside" the text-area of the Label.
I will probably file a bug report for this, the label should solve this problem, not the developer using it...

@KL7000F
Copy link

KL7000F commented May 13, 2016

The current changes from simmac looks fine under ubuntu. The italic text now good at the end.

@blizzard4591
Copy link
Owner

At the end - yes. But not if a line break occures:
openmittsubugpullreq3_2

@KL7000F
Copy link

KL7000F commented May 13, 2016

Damn, your right! But, is it not a better idea to shorten / cut the text? In the app we have only the time from receive and the agreed / disagreed. I would put the name and ID on the top (with other color or bold?) and shorten the time / date (with year?) / status to a minimum. Then we have no more problems.
78391463146696367

@blizzard4591
Copy link
Owner

I tried building a minimal example for a bug report and can not get it to fail as nicely as on the screenshots. There seem to be special cicumstances here. Ideas?

@KL7000F
Copy link

KL7000F commented May 18, 2016

What's exactly the big problem?

@blizzard4591
Copy link
Owner

Now tracking externally under https://bugreports.qt.io/browse/QTBUG-53502

The minimal example required the text-alignment attribute "AlignRight" to trigger the bug.

@blizzard4591
Copy link
Owner

Ok. Since your UI changes are way to good to keep them from the users, I will merge this and fix the italic font issue later on :)

@blizzard4591 blizzard4591 merged commit d6572ac into blizzard4591:master May 19, 2016
@gyps gyps mentioned this pull request Jan 7, 2020
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.

None yet

4 participants