Commit Graph

55 Commits

Author SHA1 Message Date
Thilo Graf
0146511f38 components: rework classes
- outsourced some classes cc_item.cpp/h, cc_draw.cpp/h
- added extra methodes for simple use of some basic components extra.cpp/h
- rework clock handling: use timer class, reworked members for
  enable/disable clock with external timer events,
  tryed to fix some display issues related with infoclock and
  time osd clock in moviebrowser, channellist, menuus
- reworked hide/kill handling, removed parameter for hide(), try to use
  cached backgrounds for other constallations, paint cache, image cache (all beta)
- reworked shadow/frame handling, add shadow modes for left/right
  arrangement, TODO: repaint for existant instances required
- reworked color gradient assignment (beta)

... Note: I had a data crash in my local git tree
and i tryed to restore my historie, but most was lost. Therefore here
the commit is large
2015-12-27 14:42:27 +01:00
TangoCash
a8be4f6365 enable color-to-color gradient 2015-05-04 09:41:41 +02:00
Thilo Graf
01516cf943 themes: use hintbox and header gradient option in theme settings
Color gradient feature was originally intended for use
inside theme settings and it's not really suitable  for
generally use as default in all themes at the moment, so it makes more
sense to have options in theme settings and let the user decide
to customize this, unless enough other gui parts can use this feature.
2015-04-29 10:16:55 +02:00
Thilo Graf
5f603ed6b0 cc_base.cpp: fix wrong statment value
Comes with 1e16dbbf59
2015-04-27 11:51:01 +02:00
Thilo Graf
1e16dbbf59 cc_base.cpp: paint shadow only on firs paint of item body
Avoids unnecessary paint of shadow layers, This should
avoid flicker effects.
2015-04-27 10:02:18 +02:00
[CST] Focus
53ce471af8 gradient: try to fix delete gradient data only on color change
Signed-off-by: Thilo Graf <dbt@novatux.de>
2015-04-27 09:25:34 +02:00
[CST] Focus
ab1b3b9008 gui/components/cc_base.cpp: add flag to control CTextBox screen saving, default is false 2015-03-06 14:13:59 +03:00
Thilo Graf
f9147d185a CComponents: add setColBodyGradient() to set gradient properties
This provides possibility to set relevant gradiant properties in cc sub classes
2014-09-25 11:08:08 +04:00
Thilo Graf
83070da483 CComponents: rename gradient variables
Use convention for cc classes.
paintGradient probaly too general and
is related to body, other fb types can be also handled with gradient.
2014-09-25 11:07:55 +04:00
Thilo Graf
64c84fb490 CComponents: move variable cc_gradientData, paintGradient into base class
Variable now usable via g_settings in all subclasses. enable/disable.
TODO: gradient type handling
2014-09-25 11:07:45 +04:00
M. Liebmann
db6fd8480d CComponents: Add color gradient for CC_FBDATA_TYPE_BOX 2014-09-25 11:06:01 +04:00
Thilo Graf
67a42c3e96 CComponents: add members to handle object tags
This can help to handle some useful values for any functions
2014-09-25 11:02:00 +04:00
martii
b21cb152b5 system/settings: move theme colors to dedicated struct
Conflicts:
	src/driver/pictureviewer/pictureviewer.cpp
	src/gui/epgview.cpp
	src/gui/osd_setup.cpp
	src/gui/pluginlist.cpp
	src/neutrino.cpp
2014-09-12 18:29:21 +04:00
martii
be29f644f0 gui/components: use COL_BACKGROUND_PLUS_0 instead of COL_BACKGROUND 2014-09-11 18:12:51 +04:00
[CST] Focus
75f7ac1235 gui/components/cc_base.cpp: try to fix screen save for CComponentsDetailLine 2014-07-17 17:02:51 +04:00
Thilo Graf
8bbd7024d9 CComponents: epand method setFrameThickness() to change selected frame 2014-06-23 18:43:47 +02:00
Thilo Graf
53cf57876c CComponents: inherit COSDFader class
Allows a simplified implementation without prior declaration and
initialisation
2014-06-23 18:43:47 +02:00
Thilo Graf
f74a000929 CComponents: fix screen rests
Frame of painted box was incomplete removed, eg hint box see also:
http://www.dbox2world.net/board293-cst-coolstream/board314-cst-coolstream-development/12230-r%C3%BCckst%C3%A4nde-auf-bildschirm-bei-apollo/
2014-06-01 23:12:29 +02:00
Thilo Graf
dc007e810a CComponents: use paintBoxRel() only in kill()
paintBackgroundBoxRel() ignores rounded corners. This avoids painting of
undesirable parts on corners.
2014-05-22 21:50:55 +02:00
Thilo Graf
6a2e701a7a CComponents/CComponentsItem: add advanced version of kill()
kill() allows now paint with defined colors over rendered objects
without restore of background. It's similar to paintBackgroundBoxRel()
known from CFrameBuffer, but with possiblity to define color,
default color is 0 like before (empty background).
Items with parent bindings use the background color of its parent
as default, but can also be ignored.

This function can be useful before repaint of items and/or,
if required, to have a clean background inside item containers.
2014-05-16 09:08:25 +02:00
Thilo Graf
750691fbbf CComponents: use neutrino debug mode for debug output 2014-04-02 08:40:21 +02:00
Thilo Graf
e6a004be87 CComponents: remove error message.
Log output should be enough.
2014-03-05 12:10:17 +01:00
M. Liebmann
d1b8246316 CComponents: More precise error message (commit f813b9e) 2014-03-03 20:20:57 +01:00
Thilo Graf
23d7b62cf0 CComponents: add new parameter 'parent'
Use strictly CComponentsForm as parent parameter in constructors.
Some parts have been cleaned up (Constructors, init methodes removed)

New parameter makes it possible already add current item in constructor.
So in mostly situations is it not necessary to use explicit addCCItem(),
but addCCItem()is still valid and necessary in certain situations.

Affected are all cc-classes and their derivates.
Some classes must or can be adapted later. The function is
not currently restricted, because usage of parent parameter is not explicit
defined in constructors, see CImageInfo, here yet are used addCCItem()
methodes.

Generally this parameter is located in the constructors before bool has_shadow,
but it is not sure whether it would be better to use this parameter as the first.
That remains to be clarified.
2014-03-03 09:43:39 +01:00
Thilo Graf
38dffb8456 CComponentsItem: add members to set item position via percent value 2014-03-03 08:54:10 +01:00
Thilo Graf
f813b9ea98 CComponents: add member CheckFbData() for fbdata check
This check happens several times, therefore it is senseful, to move into own member.
Function returns false on error and is used here to show an error message if
something was wrong.
Such errors can happen on position or dimension errors e.g. out of screen or
too large display values.

Note:  this is only an emergency helper for debugging on
fatal errors during developing of window stuff. Mostly errors
of this kind causing crashes and must be fixed.
2014-03-03 08:54:09 +01:00
Thilo Graf
57a6c36329 CComponents: remove wrong init value for item position
This causes an unnecessary offset and possible fb-remains.
This was observed at the header in Imageinfo, but only without shadow.
2014-02-05 11:56:48 +01:00
Thilo Graf
39d6340598 CComponents: rework some debug outputs
This shows also x or y values < 0.
2014-01-24 23:13:45 +01:00
Thilo Graf
ed7a2fd625 CComponents: replace clear() with clearFbData(), remove cleanCCForm()
clear() replaces now clearCCItems() and cleanCCForm() is superfluous.
2014-01-07 09:41:06 +01:00
Thilo Graf
9b299824d6 CComponents: prevent possible segfaults, remove redundant delete
- if dx, dy == 0, it is not senseful to save screen.
- delete[] v_fbdata[i].pixbuf is also called in clear()
2013-12-22 20:07:33 +01:00
Stefan Seyfried
9eddaedfdd CComponents: fix compiler warnings with DEBUG_CC 2013-12-18 21:10:17 +01:00
Thilo Graf
8442b39c28 CComponents: replace __FUNCTION__ with __func__
__func__ is more suitable for portability
2013-12-18 15:13:19 +01:00
Thilo Graf
a7379d6cee CComponents: use DEBUG_CC for debug output 2013-11-17 15:19:43 +01:00
Thilo Graf
a6e0564c2b CComponents: remove log spam 2013-11-12 10:52:24 +01:00
Thilo Graf
e5b0673259 CComponents: add log warning if position = 0
Value 0 for embedded items should be unproblematic, buy single items
should have minimum value = 1.
2013-11-11 00:19:48 +01:00
Thilo Graf
8ae491a994 CComponents: add property to allow/disallow paint of items
This causes initialization of all properties, but
affects the behavior of item paint.
This can be understood as a counterpart to isPainted().
2013-11-11 00:19:48 +01:00
Thilo Graf
72705b19de CComponents: use correct initial values screen start position
Value '0' is wrong.
2013-11-11 00:19:47 +01:00
Thilo Graf
6dd1da0628 revert 6ee7fac1a5
Was bad idea to rename. Other Classes can also inherit this. See CMenuTarget
2013-10-26 23:25:59 +02:00
Thilo Graf
6ee7fac1a5 CComponents: rename hide() to hideCC()
There are too many name conflicts with hide-members in other classes.
2013-10-24 21:39:04 +02:00
Thilo Graf
f7798affc6 CComponents: add unfied header file for general include of cc classes
Provides a unified header file, so it is not required to select a
certain header file.
2013-10-24 21:19:07 +02:00
Thilo Graf
3c5f4867fb CComponents: rename and move real position attributes
These attributes are better placed in the basic class.
2013-06-03 22:12:47 +02:00
Michael Liebmann
4da83b546c * CComponents: Reworked paint the shadows
- Paint rounded corners only where it is required
- Skip paint frame/paint shadow, if not defined
2013-05-24 21:48:56 +02:00
Michael Liebmann
072097cd06 * Fix CComponents::getScreen()/hide() & CComponentsItem::hideCCItem()
- Use CFrameBuffer::waitForIdle() to ensure that all GXA commands
  are finished before SaveScreen() / RestoreScreen() is executed
2013-05-18 14:44:20 +01:00
Michael Liebmann
c5e223a231 * CComponents: Add corner_type to paintFbItems() => paintBoxFrame() 2013-05-16 11:01:41 +01:00
Thilo Graf
9ae72bf02d CComponents: fix missing save of background in paint_bg=false mode
Exit in initVarItem() on !paint_bg was too early.
2013-05-12 14:17:10 +02:00
Michael Liebmann
612ef514a3 * CComponents::paintFbItems: Fix paint frame
- Remove function CComponents::allowPaint()
2013-05-10 11:32:12 +01:00
Michael Liebmann
309b371060 * CComponents::paintFbItems: Don't paint item if dx or dy are 0 2013-05-08 07:06:12 +01:00
Thilo Graf
a4c3e08f77 CComponents: rework kill()
There was some problems with restore, hide, clean and save background of item parts,
seen in detailsline. kill() worked not really clean.
kill() works now as virtual member and uses paintBackgroundBoxRel().

In consequence of which:
-unnecessary members in subclasses removed.
-add some comments
2013-05-03 19:51:57 +02:00
Thilo Graf
894d229b09 CComponents: add vars to modifie frames in selected mode 2013-04-16 08:32:42 +02:00
Thilo Graf
d7c35b07e4 CComonents: use allowPaint() as private, parameter as by rev
not used in sub classes
2013-04-16 08:26:56 +02:00