Thilo Graf
6b4e57ad73
CTextBox: use scaled base dimensions
2017-02-26 21:29:53 +01:00
M. Liebmann
ef61905a2d
Merge branch 'master' into pu/fb-modules
2017-02-08 20:16:41 +01:00
Stefan Seyfried
648c00f26a
move gui/color.h includes from headers to cpp files
2017-02-07 17:23:42 +01:00
Stefan Seyfried
2303d94300
replace fontrenderer.h include with forward declaration
...
in order to flatten the build dependency tree further, include
fontrenderer.h directly where needed, in header files a forward
declaration is enough
2017-02-07 17:23:42 +01:00
Thilo Graf
95de68c5a5
CTextBox: compare condition for text render more precisely
2017-02-07 17:12:25 +01:00
Thilo Graf
2f24e98252
CTextBox: fix m_old_cText update after text paint
...
refreshText() executes loop also for text with more than one line
and m_old_cText attribut should be updated only if loop is ready. Otherwise
in text boxes with more than one line, only first line would be painted.
2017-01-31 16:36:41 +01:00
Thilo Graf
1120e3a37d
CTextBox: rework return control of value of setText() function
...
value was not clearly, hope i'ts now
2017-01-31 16:36:41 +01:00
Thilo Graf
d31deac545
CTextBox: add attribut 'm_bg_painted'
...
Shoul help in together with changed text content
to control required text render.
2017-01-31 16:36:41 +01:00
Thilo Graf
ae903ddb2f
CTextBox: remove text reinit from reInitToCompareVar()
...
Will be already done after each text render.
2017-01-31 16:36:41 +01:00
Thilo Graf
9b69803ca4
CTextBox: paint bg always if pixbuffer exists
...
Should prevent unintended possible overlap on multiple font render.
2017-01-31 16:36:41 +01:00
M. Liebmann
97d1d93c93
fontrenderer: Rework rendering for better font presentation
...
- For the correct use of the changes should be built freetype
with the following settings:
#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
BS-Patch for freetype 2.5-2.7
-----------------------------
** include/freetype/config/ftoption.h **
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
-/* #define TT_CONFIG_OPTION_SUBPIXEL_HINTING */
+#define TT_CONFIG_OPTION_SUBPIXEL_HINTING
BS-Patch for freetype 2.7.1
---------------------------
** include/freetype/config/ftoption.h **
-/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
+#define FT_CONFIG_OPTION_SUBPIXEL_RENDERING
2017-01-31 16:36:40 +01:00
Stefan Seyfried
b623aad5c3
textbox: fix output for BOTTOM mode
...
If more text is added to a textbox than fits into the window, the last
lines are stripped. In BOTTOM (and non-SCROLL) mode, it makes more sense
to strip the first lines. This is used by shellwindow, e.g. in package
management menu.
2017-01-29 21:27:45 +01:00
svenhoefer
4cfff44e29
CTextBox::refreshText: Fix flags for RenderString() v2.0; thx to DboxOldie
2017-01-24 14:41:30 +01:00
M. Liebmann
e5ab37c387
CTextBox::refreshText: Fix flags for RenderString()
2017-01-20 10:36:00 +01:00
Thilo Graf
cddf1835b5
CTextBox: try to fix getMaxLineWidth() methode
...
If found no linebreak, return value could be too small.
Space char simulates a line termination as a workaround to get
largest possible width.
2016-12-09 21:32:58 +01:00
Thilo Graf
8142ed47cc
CTextBox: use CORNER_NONE as default corner mode
...
CORNER_ALL is not the same like CORNER_NONE.
Could cause problems in the evaluation.
2016-11-28 21:43:48 +01:00
Thilo Graf
7031dc1da4
CTextBox: try to fix possible background artefacts in transparent mode
...
supplement to: - textbox: fix box width in round corners mode
Radius was always subtracted in all text modes.
TODO: value of m_nBgRadius itself is not considered at the moment.
2016-11-21 10:55:11 +01:00
Thilo Graf
91c7588aa6
CTextBox: add static function to get largest line of passed text
...
This could be useful eg. for size calculations.
2016-11-10 11:19:09 +01:00
Thilo Graf
ac8d05f5e1
CTextBox: add static function to get count of lines from passed text
...
I'm missing a function that returns current line count outside
of a CTextBox object. This could be useful eg. for size calculations
before object init etc
2016-11-10 11:15:43 +01:00
svenhoefer
0f5aa73033
- textbox: fix compilation for generic hardware
...
error: declaration of ‘clear’ shadows a member of 'this'
2016-11-02 09:55:45 +01:00
svenhoefer
0b504f8c60
- textbox: add clear() function
2016-10-31 23:06:47 +01:00
svenhoefer
002277fb5f
- textbox: fix box width in round corners mode
2016-10-28 09:55:40 +02:00
svenhoefer
99a9f8a7e5
- textbox: fix lineBreakWidth calculation
2016-10-27 11:02:18 +02:00
svenhoefer
be9143a511
- textbox: fix round corners/scrollbar handling
2016-10-25 11:06:12 +02:00
svenhoefer
c074f1365f
- textbox: fix text position in mode CENTER and mode RIGHT; ...
...
and add VISUAL_DEBUG define. That paints beautiful colored boxes
to see what's going on.
2016-10-13 19:07:22 +02:00
svenhoefer
af7643a285
- textbox: use OFFSET defines
2016-10-13 15:12:52 +02:00
vanhofen
6629b64d6c
- colors: add COL_SCROLLBAR_PASSIVE wrapper
2016-10-10 14:19:54 +02:00
vanhofen
7e7d4e5fc1
- colors: add COL_SCROLLBAR_ACTIVE wrapper
2016-10-10 14:19:54 +02:00
Jacek Jendrzej
c9b5470a47
src/gui/widget/textbox.cpp try to fix paint sidebar
2016-08-15 15:49:04 +02:00
Thilo Graf
2dd2fac376
CTextBox: don't paint full background if max text width smaller than bg width
2016-06-26 15:32:28 +02:00
Thilo Graf
8afe4495e7
CTextBox: remove statement for text change check
...
Check of text change is not enough. Scrollboxes could have some problems.
Dimension changes must be considered too and this is to much effort at
the moment. Use of OnAfterScrollPage is much easier.
this reverts: 342de45cc3
2016-02-18 10:42:59 +01:00
Thilo Graf
342de45cc3
CTextBox: don't paint full background if max text width smaller than bg width
2016-02-16 09:39:05 +01:00
Thilo Graf
4d1780486d
CTextBox: fix missing init of old bg color
...
Avoids possible usage of wrong color after init.
2016-02-16 09:39:04 +01:00
Thilo Graf
9d72b086a2
text screen save: try to rework screen save behavior for textbox objects
...
Screen save now always disabled by default and can be controlled
outside of relevant objects.
2016-01-21 11:00:38 +01:00
Thilo Graf
35a08fc5dd
CTextBox: add signal handler into scroll methodes
2016-01-17 23:37:31 +01:00
svenhoefer
3d4bb41062
- textbox: allow users setting screen_StartX/Y = 0
2016-01-07 13:18:49 +01:00
Thilo Graf
a2171dad4a
CTextBox: add/modify methodes for screen handlings
...
- split hasChanged() into hasChangedPos(), hasChangedDim()
- add return value bool to enableBackgroundPaint(), enableSaveScreen()
- add clearScreenBuffer(), for unified usage in destructor and functions
- add OnAfterRefresh() as a signal/slot handler, this allows to use
external methodes as callbacks after painted text
2015-12-27 14:42:26 +01:00
Thilo Graf
638832f535
CTextBox: fix calculated but not used parameter
2015-07-17 17:30:41 +02:00
Thilo Graf
672ae3fdb1
CTextBox: fix calculated but not used parameter
2015-07-17 17:07:14 +02:00
Thilo Graf
4e002bdf66
CTextBox: consider utf8 mode parameter for correct render width, if required
2015-07-17 16:01:20 +02:00
Thilo Graf
37c863d141
CTextBox: add switch for utf8 disable/enable
2015-07-12 21:08:25 +02:00
Thilo Graf
87cbb564a3
CTextBox: ensure save screen only if dimensions are valid
...
0 values are critical
2015-05-04 10:37:03 +02:00
Thilo Graf
459c120060
CTextBox: catching error if position has signed values
...
Wrong position assignments can trigger crash. Prevent segfaults.
Error log should indicate this.
2015-03-29 22:40:15 +02:00
[CST] Focus
72997591a0
gui/widget/textbox.cpp: add flag to control screen save, default is false;
...
disable hide in desctructor
2015-03-06 14:13:59 +03:00
Stefan Seyfried
a85878db2f
CTextBox: fix text position calculation
2015-02-09 13:47:31 +01:00
M. Liebmann
a6487fd951
CTextBox: Fix center / right text display
...
- The x position of the text could assume negative values,
when the text length was greater than the specified range.
2014-10-16 17:14:04 +02:00
Thilo Graf
f902c7a1e3
CTextBox: fix return value of getMaxLineWidth()
...
m_nMaxLineWidth was never used
2014-08-26 17:26:55 +04:00
M. Liebmann
1b9037e8e8
CTextBox: Add Flag m_renderMode (Font::FULLBG) for RenderString()
2014-06-29 13:25:32 +02:00
svenhoefer
649d1b1f9d
- change RenderString() default to UTF8
2014-06-11 23:07:13 +02:00
svenhoefer
8b91cda918
- change getRenderWidth() default to UTF8
2014-06-11 23:07:00 +02:00