1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2024-07-04 21:28:54 +03:00
Commit Graph

19 Commits

Author SHA1 Message Date
Nebuleon Fumika
69d6c0006c TextDialog: Improve the average and worst-case performance of word wrapping
This affects manuals, About GMenu2X, and the Log Viewer.

Instead of trying to compute the width of the entire string, then backing
off one word at a time, TextDialog::preProcess now performs a binary search
on Font::getTextWidth(string) and backs off to the last fitting space, if
there is one, at the last moment.

In Japanese and Chinese text, words are not usually separated by spaces.
Text in these languages is now wrapped when it would reach the edge of the
screen.
2014-07-19 02:35:09 +02:00
Maarten ter Huurne
86ee9955d6 Removed dedicated horizontal line routine
Just draw a 1-pixel-high box instead.
2014-07-19 00:43:05 +02:00
Nebuleon Fumika
099bd24556 Use the font's suggested line height instead of its ascent and descent.
In well-described fonts, this enables multi-line text (e.g. in manuals) to be
more readable.

The term "height" is also replaced with "line spacing" in Font's code.
2014-07-17 02:03:02 +02:00
Paul Cercueil
47b098cce6 Fix text in log viewer disappearing when pressing alt-right 2014-04-17 20:52:41 +02:00
Maarten ter Huurne
666be4d354 Fixed text area coordinates in TextDialog
Take top and bottom bar height as defined by skin into account.
2013-08-14 13:25:07 +02:00
Maarten ter Huurne
b18e3fa6a8 Don't pass screen coordinates to drawScrollBar()
The scroll bar always spans the content area of the screen: the
position and height depend only on the theme and not on who is
drawing it.

Note that the coordinates passed were wrong in most cases, so this
commit fixes the scroll bar positioning for several dialogs.
2013-08-14 11:47:29 +02:00
Paul Cercueil
abc461bf95 Fix build on 32-bit targets...
This fixes commit 59a456690b
which introduced a regression.
2013-07-03 23:45:38 -04:00
Paul Cercueil
59a456690b Fix build on 64-bit systems 2013-07-03 23:17:24 -04:00
Maarten ter Huurne
f28e4f6d89 Minimized gmenu2x.h.
Everything that does not need to be shared was moved to gmenu2x.cpp.
2011-10-23 17:27:29 +02:00
Maarten ter Huurne
aea1c44020 utilities: Replace min/max functions by the versions from STL. 2011-10-23 17:00:23 +02:00
Maarten ter Huurne
e0e7e87ebc Massive header cleanup.
The main goal is to avoid including "gmenu2x.h" from headers.
But I did various other cleanups as well while I was at it.
2011-10-23 16:13:02 +02:00
Maarten ter Huurne
315bf0a180 InputManager: C++-style type definitions.
There is no need to typedef enums and structs in C++.
Put types defined by InputManager inside the class namespace.
Changed type names to CamelCase.
2011-10-23 09:04:12 +02:00
Ayla
759eefd676 The files "a.png" and "b.png" have been renamed to "cancel.png" and "accept.png". 2011-09-18 03:40:33 +02:00
Ayla
d0cfe7c60d Modified the key shortcuts for the text display dialog. 2011-09-18 03:05:25 +02:00
Maarten ter Huurne
8a81837c04 Surface: Make pixel format conversion explicit.
Instead of having the copy constructor convert to display format, the new
copy constructor preserves the pixel format and a separate method was
introduced to convert surfaces to display format.

The code was made more robust as well: it should no longer crash if the
wallpaper cannot be loaded.
2011-06-03 11:46:36 +02:00
Ayla
563cb34a89 Rewrote the whole input system.
Gmenu2X will no longer eat 100% CPU ;)
2010-09-17 22:34:26 +02:00
Lars-Peter Clausen
6da573f303 Move methods only used by dialogs from the GMenu2x class to a common base class
for all dialog classes.
2010-05-05 14:35:52 +02:00
Lars-Peter Clausen
40a26e1a9c pass strings by reference where possible 2010-05-02 14:38:16 +02:00
Mirko Lindner
cddcd72e33 initial commit - needs clean-up
Signed-off-by: Mirko Lindner <mirko@sharism.cc>
2010-02-04 12:33:47 +01:00