Commit Graph

107 Commits

Author SHA1 Message Date
Thilo Graf
f9b4d1c6cc textbox.cpp: check for pix buffer content first for shure
Origin commit data
------------------
Commit: 66b0d16131
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-04-28 (Sun, 28 Apr 2019)
2019-04-28 21:17:37 +02:00
Thilo Graf
ba2014ed73 textbox.cpp/h: use parameter as ref, ensure empty string on empty line array
Origin commit data
------------------
Commit: 1d97e5f0b8
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-04-11 (Thu, 11 Apr 2019)
2019-04-11 21:07:33 +02:00
Thilo Graf
c8cccd0147 widget/textbox: cpp: try to fix possible issue while restore screen
maybe possible crash


Origin commit data
------------------
Commit: 17d0947446
Author: Thilo Graf <dbt@novatux.de>
Date: 2019-01-01 (Tue, 01 Jan 2019)
2019-01-01 21:50:50 +01:00
Thilo Graf
9c3991a4e4 CTextBox: move setTextRenderModeFullBG() into cpp file.
Origin commit data
------------------
Commit: e7f49dbfec
Author: Thilo Graf <dbt@novatux.de>
Date: 2018-12-08 (Sat, 08 Dec 2018)
2018-12-08 23:15:13 +01:00
Thilo Graf
cbf5047add CTextBox: move enableBackgroundPaint() into cpp file
partial cleanup


Origin commit data
------------------
Commit: 9f4a4cea12
Author: Thilo Graf <dbt@novatux.de>
Date: 2018-12-08 (Sat, 08 Dec 2018)
2018-12-08 23:15:13 +01:00
Thilo Graf
b98ccd6fba src/gui/widget/textbox.cpp: try to fix possible background handling
Condition of changed postion and unchanged text was not considered.


Origin commit data
------------------
Commit: fa6f42b53a
Author: Thilo Graf <dbt@novatux.de>
Date: 2018-11-21 (Wed, 21 Nov 2018)
2018-11-21 00:00:17 +01:00
vanhofen
ba6788e8ec textbox: use CComponentsScrollbar
Origin commit data
------------------
Commit: c233afb408
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-06-15 (Thu, 15 Jun 2017)

Origin message was:
------------------
- textbox: use CComponentsScrollbar
2017-06-15 13:05:39 +02:00
Thilo Graf
030c9c496d CtextBox: Precise function getLines()
Use refreshTextLineArray() for calculation of lines.
Note: 	count of lines will be only returned if CTextBox object
	is initialized with a valid CBox instance,
	otherwise count of 0 lines will be returned!

also remove inline declaration, not needed here


Origin commit data
------------------
Commit: ec83549e50
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-06-15 (Thu, 15 Jun 2017)
2017-06-15 01:01:54 +02:00
Michael Liebmann
ec09694ab6 Merge branch 'master' into pu/fb-setmode
Origin commit data
------------------
Commit: d3ceb0ec7b
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-04-24 (Mon, 24 Apr 2017)
2017-04-24 21:51:25 +02:00
vanhofen
ce494cbd38 scrollbars: avoid usage of COL_SCROLLBAR_PASSIVE_PLUS_0 ...
... outside of CComponentsScrollBar(). Since the color-changes in
9c8c262 the non-CC scrollbars looks weird.


Origin commit data
------------------
Commit: fe5f84c1d0
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-04-24 (Mon, 24 Apr 2017)

Origin message was:
------------------
- scrollbars: avoid usage of COL_SCROLLBAR_PASSIVE_PLUS_0 ...

... outside of CComponentsScrollBar(). Since the color-changes in
9c8c262 the non-CC scrollbars looks weird.
2017-04-24 12:29:52 +02:00
Michael Liebmann
eb3e1116ac Merge branch 'master' into pu/fb-setmode
Origin commit data
------------------
Commit: bab10ee438
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-03-06 (Mon, 06 Mar 2017)
2017-03-06 22:06:38 +01:00
Thilo Graf
4f6d09bc1f CTextBox: fix pass of SCROLL_FRAME_WIDTH
Origin commit data
------------------
Commit: 4c388bb71c
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-03-06 (Mon, 06 Mar 2017)
2017-03-06 21:11:08 +01:00
Thilo Graf
27fec8dc70 CTextBox: use scaled base dimensions
Origin commit data
------------------
Commit: 6b4e57ad73
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-02-26 (Sun, 26 Feb 2017)
2017-02-26 21:29:53 +01:00
Michael Liebmann
534d1b315e Merge branch 'master' into pu/fb-modules
Origin commit data
------------------
Commit: ef61905a2d
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-02-08 (Wed, 08 Feb 2017)
2017-02-08 20:16:41 +01:00
Stefan Seyfried
4fc79052ea move gui/color.h includes from headers to cpp files
Origin commit data
------------------
Commit: 648c00f26a
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-02-05 (Sun, 05 Feb 2017)
2017-02-07 17:23:42 +01:00
Stefan Seyfried
f6d5a96838 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


Origin commit data
------------------
Commit: 2303d94300
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-02-05 (Sun, 05 Feb 2017)
2017-02-07 17:23:42 +01:00
Thilo Graf
d5c3981f10 CTextBox: compare condition for text render more precisely
Origin commit data
------------------
Commit: 95de68c5a5
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-02-07 (Tue, 07 Feb 2017)
2017-02-07 17:12:25 +01:00
Thilo Graf
ef6f65cbfb 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.


Origin commit data
------------------
Commit: 2f24e98252
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-01-24 (Tue, 24 Jan 2017)
2017-01-31 16:36:41 +01:00
Thilo Graf
cd3239a523 CTextBox: rework return control of value of setText() function
value was not clearly, hope i'ts now


Origin commit data
------------------
Commit: 1120e3a37d
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-01-17 (Tue, 17 Jan 2017)
2017-01-31 16:36:41 +01:00
Thilo Graf
f3fa638e29 CTextBox: add attribut 'm_bg_painted'
Shoul help in together with changed text content
to control required text render.


Origin commit data
------------------
Commit: d31deac545
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-01-24 (Tue, 24 Jan 2017)
2017-01-31 16:36:41 +01:00
Thilo Graf
a70f4d2974 CTextBox: remove text reinit from reInitToCompareVar()
Will be already done after each text render.


Origin commit data
------------------
Commit: ae903ddb2f
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-01-16 (Mon, 16 Jan 2017)
2017-01-31 16:36:41 +01:00
Thilo Graf
02ee99fe00 CTextBox: paint bg always if pixbuffer exists
Should prevent unintended possible overlap on multiple font render.


Origin commit data
------------------
Commit: 9b69803ca4
Author: Thilo Graf <dbt@novatux.de>
Date: 2017-01-10 (Tue, 10 Jan 2017)
2017-01-31 16:36:41 +01:00
Michael Liebmann
de73bdf3d4 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


Origin commit data
------------------
Commit: 97d1d93c93
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-01-24 (Tue, 24 Jan 2017)

Origin message was:
------------------
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
f17233f682 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.


Origin commit data
------------------
Commit: b623aad5c3
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-01-29 (Sun, 29 Jan 2017)
2017-01-29 21:27:45 +01:00
vanhofen
70c0b2ae5e CTextBox::refreshText: Fix flags for RenderString() v2.0; thx to DboxOldie
Origin commit data
------------------
Commit: 4cfff44e29
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-01-24 (Tue, 24 Jan 2017)
2017-01-24 14:41:30 +01:00
Michael Liebmann
4e954b5023 CTextBox::refreshText: Fix flags for RenderString()
Origin commit data
------------------
Commit: e5ab37c387
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-01-20 (Fri, 20 Jan 2017)
2017-01-20 10:36:00 +01:00
Thilo Graf
932e60f5cf 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.


Origin commit data
------------------
Commit: cddf1835b5
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-12-09 (Fri, 09 Dec 2016)
2016-12-09 21:32:58 +01:00
Thilo Graf
4dcb5f6e88 CTextBox: use CORNER_NONE as default corner mode
CORNER_ALL is not the same like CORNER_NONE.
Could cause problems in the evaluation.


Origin commit data
------------------
Commit: 8142ed47cc
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-27 (Sun, 27 Nov 2016)
2016-11-28 21:43:48 +01:00
Thilo Graf
e2afccba70 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.


Origin commit data
------------------
Commit: 7031dc1da4
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-21 (Mon, 21 Nov 2016)
2016-11-21 10:55:11 +01:00
Thilo Graf
4a2a66399d CTextBox: add static function to get largest line of passed text
This could be useful eg. for size calculations.


Origin commit data
------------------
Commit: 91c7588aa6
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-10 (Thu, 10 Nov 2016)
2016-11-10 11:19:09 +01:00
Thilo Graf
1523582d35 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


Origin commit data
------------------
Commit: ac8d05f5e1
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-11-09 (Wed, 09 Nov 2016)
2016-11-10 11:15:43 +01:00
vanhofen
fd751e6441 textbox: fix compilation for generic hardware
error: declaration of ‘clear’ shadows a member of 'this'


Origin commit data
------------------
Commit: 0f5aa73033
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-11-02 (Wed, 02 Nov 2016)

Origin message was:
------------------
- textbox: fix compilation for generic hardware

error: declaration of ‘clear’ shadows a member of 'this'
2016-11-02 09:55:45 +01:00
vanhofen
eba7ee1d70 textbox: add clear() function
Origin commit data
------------------
Commit: 0b504f8c60
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-10-31 (Mon, 31 Oct 2016)

Origin message was:
------------------
- textbox: add clear() function
2016-10-31 23:06:47 +01:00
vanhofen
96a73691a7 textbox: fix box width in round corners mode
Origin commit data
------------------
Commit: 002277fb5f
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-10-28 (Fri, 28 Oct 2016)

Origin message was:
------------------
- textbox: fix box width in round corners mode
2016-10-28 09:55:40 +02:00
vanhofen
1a89ed0d87 textbox: fix lineBreakWidth calculation
Origin commit data
------------------
Commit: 99a9f8a7e5
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-10-27 (Thu, 27 Oct 2016)

Origin message was:
------------------
- textbox: fix lineBreakWidth calculation
2016-10-27 11:02:18 +02:00
vanhofen
39f362b0c0 textbox: fix round corners/scrollbar handling
Origin commit data
------------------
Commit: be9143a511
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-10-25 (Tue, 25 Oct 2016)

Origin message was:
------------------
- textbox: fix round corners/scrollbar handling
2016-10-25 11:06:12 +02:00
vanhofen
e8116e109d 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.


Origin commit data
------------------
Commit: c074f1365f
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-10-13 (Thu, 13 Oct 2016)

Origin message was:
------------------
- 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
vanhofen
97b2f257b9 textbox: use OFFSET defines
Origin commit data
------------------
Commit: af7643a285
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-10-13 (Thu, 13 Oct 2016)

Origin message was:
------------------
- textbox: use OFFSET defines
2016-10-13 15:12:52 +02:00
vanhofen
af3e39a47d colors: add COL_SCROLLBAR_PASSIVE wrapper
Origin commit data
------------------
Commit: 6629b64d6c
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-10-10 (Mon, 10 Oct 2016)

Origin message was:
------------------
- colors: add COL_SCROLLBAR_PASSIVE wrapper
2016-10-10 14:19:54 +02:00
vanhofen
4b3b25ca7a colors: add COL_SCROLLBAR_ACTIVE wrapper
Origin commit data
------------------
Commit: 7e7d4e5fc1
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-10-10 (Mon, 10 Oct 2016)

Origin message was:
------------------
- colors: add COL_SCROLLBAR_ACTIVE wrapper
2016-10-10 14:19:54 +02:00
Jacek Jendrzej
95b3a4c88c src/gui/widget/textbox.cpp try to fix paint sidebar
Origin commit data
------------------
Commit: c9b5470a47
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2016-08-15 (Mon, 15 Aug 2016)
2016-08-15 15:49:04 +02:00
Thilo Graf
1cc131bce9 CTextBox: don't paint full background if max text width smaller than bg width
Origin commit data
------------------
Commit: 2dd2fac376
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-02-10 (Wed, 10 Feb 2016)
2016-06-26 15:32:28 +02:00
Thilo Graf
54af246f08 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: 47b4ea481c


Origin commit data
------------------
Commit: 8afe4495e7
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-02-18 (Thu, 18 Feb 2016)
2016-02-18 10:42:59 +01:00
Thilo Graf
47b4ea481c CTextBox: don't paint full background if max text width smaller than bg width
Origin commit data
------------------
Commit: 342de45cc3
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-02-10 (Wed, 10 Feb 2016)
2016-02-16 09:39:05 +01:00
Thilo Graf
a50e93a532 CTextBox: fix missing init of old bg color
Avoids possible usage of wrong color after init.


Origin commit data
------------------
Commit: 4d1780486d
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-02-02 (Tue, 02 Feb 2016)
2016-02-16 09:39:04 +01:00
Thilo Graf
e4fbc51887 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.


Origin commit data
------------------
Commit: 9d72b086a2
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-01-21 (Thu, 21 Jan 2016)
2016-01-21 11:00:38 +01:00
Thilo Graf
bbeb88d18f CTextBox: add signal handler into scroll methodes
Origin commit data
------------------
Commit: 35a08fc5dd
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-01-17 (Sun, 17 Jan 2016)
2016-01-17 23:37:31 +01:00
vanhofen
5114926343 textbox: allow users setting screen_StartX/Y = 0
Origin commit data
------------------
Commit: 3d4bb41062
Author: vanhofen <vanhofen@gmx.de>
Date: 2016-01-07 (Thu, 07 Jan 2016)

Origin message was:
------------------
- textbox: allow users setting screen_StartX/Y = 0
2016-01-07 13:18:49 +01:00
Thilo Graf
d5ce36ab27 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


Origin commit data
------------------
Commit: a2171dad4a
Author: Thilo Graf <dbt@novatux.de>
Date: 2015-11-18 (Wed, 18 Nov 2015)

Origin message was:
------------------
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
323357fcb1 CTextBox: fix calculated but not used parameter
Origin commit data
------------------
Commit: 638832f535
Author: Thilo Graf <dbt@novatux.de>
Date: 2015-07-17 (Fri, 17 Jul 2015)
2015-07-17 17:30:41 +02:00