Commit Graph

77 Commits

Author SHA1 Message Date
Thilo Graf
97fc294d54 cc_frm_footer: add members to enable button allignment on top of footer 2019-10-27 16:24:47 +01:00
Thilo Graf
31b73a4e35 cc_frm_footer/cc_frm_button: fix some arangement errors 2019-10-27 16:24:47 +01:00
Thilo Graf
d86dcd36a7 components: use const bool& parameter in paint methodes 2019-10-27 16:24:47 +01:00
Thilo Graf
1c574e4a07 header/footer: add overloaded versions of header class with size mode option
Size mode didn't really work. It is easier to implement
headers with with separate class constructor and other size mode
Footer works also with this  additional parameter but without additional
overloaded constructors.
2019-04-02 16:34:56 +02:00
Thilo Graf
57790766e7 src/gui/components/cc_frm_footer.cpp: fix assinged vector content 2018-08-18 11:22:23 +02:00
Thilo Graf
8a9ef1db85 cc_frm_footer.cpp: avoid possible crash if content[i].button = NULL
If content[i].button = NULL, conversion of content[i].button into std::string would fail.
2018-08-18 11:22:23 +02:00
Thilo Graf
5d212fc401 src/gui/components/cc_frm_footer.cpp: add member getButtonLabel()
Allows to get button label object from button collection.
2018-08-18 11:22:23 +02:00
Thilo Graf
35196222aa Fix "cc_frm_footer.cpp: fix possible compiler warning"
This reverts commit 885ed60ea4.
2018-03-02 21:44:07 +01:00
Thilo Graf
885ed60ea4 cc_frm_footer.cpp: fix possible compiler warning
long unsigned int is expected
2018-03-01 16:55:27 +01:00
Thilo Graf
fb5c943db4 cc: expand cc-type with name
Required for internal operations where it is useful to have object
names and for better debugging.
2017-12-30 22:58:15 +01:00
Thilo Graf
39fb9f47f4 CComponentsFooter: fix force re init of button container
clear() removes only items and their instances inside button container, but all
other properties (e.g. width) are not touched. Re init should avoids this.
2017-12-15 18:40:51 +01:00
Thilo Graf
c7a2dd70fc CComponentsFooter: rework uniformed arrangement
Some parts were incomplete treated with defined parameter
'label_width' and/or 'chain_width'.
2017-10-13 12:35:59 +02:00
Thilo Graf
16dac64ed2 CComponentsFooter: fix possible error with non-POD element type
affected is struct type 'button_label_cc'
2017-08-28 12:16:45 +02:00
Thilo Graf
27995b19fa CComponentsFooter: fix possible conversion warning
For platform compatibility. eg. with neutrino-pc on it is possible
that size_t is long unsigned ini, for others unsinged int
2017-08-28 12:16:45 +02:00
Thilo Graf
47f7426aa7 CComponentsFooter: remove FIXME tag
fixed since 2e24663a3f
Obsolete wrong types caused this.
2017-06-28 20:36:51 +02:00
Thilo Graf
4146a461c1 CCButtonSelect: rename chain to btn_container
more plausible name
2017-06-15 01:01:54 +02:00
Thilo Graf
4d753d7437 CCButtonSelect: outsource button select handling into own class 2017-06-15 01:01:54 +02:00
Thilo Graf
fb0dc47e35 CComponentsFooter: avoid crash because possible divisions by 0 2017-04-13 23:36:29 +02:00
Thilo Graf
47fceca188 CComponentsFooter: add missing member inits 2017-04-08 08:16:05 +02:00
Thilo Graf
4eb6a315fc CComponentsButton: simplify assignment of button message values
Count of alternate message values was limited to 1 value. Now it is
possible to add any count of message values.

directKey and directKeyAlt were removed from struct type 'button_label_cc'
and directKeys was added as container for possible message values.

Some methods of CComponentsFooter had to be adapted for that.
2017-03-20 22:55:05 +01:00
Thilo Graf
c766a970dc CComponentsFooter: simplify implementation of button labels
button_label_l and button_label_s are now
merged to button_label_cc with prepared default values for text and locales.This type contains all possible
button label properties. Values for locales and string
are evaluated in setButtonLabels(), so it's possible to remove some
overloaded methodes.
2017-03-11 00:45:25 +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
a9b8b22339 CComponentsFooter: optimize button position and size
Buttons are now smaller so it should be enough, to center only, if not
please report.
2017-01-05 22:53:31 +01:00
Thilo Graf
b98319cb91 CComponentsHeader/CComponentsFooter: prevent crash on changed font settings
Default fonts for header and footer must be handled too.
After font settings changes these objects could be invalid.
Default fonts have invalid pointers after font changes too. Extra reset is required.
2016-12-30 20:33:26 +01:00
Thilo Graf
8bf6b7fb3a CComponentsFooter: fix wrong text color with single button in footers
* remove size compare

If only one button exists, possible new text color would be ignored
and wrong Text color was visible with one item.
This behavior was observed in message boxes with
single buttons (eg OK, or Cancel).
2016-11-29 16:13:47 +01:00
Thilo Graf
427b65813d CComponentsFooter: disable gradient for footers
This is not really completly implemented for footer at the momemnt, because
button objects are still not prepared or tuned for that.

If it is enabled, currently it could occur unintentionally background behavior
eg.: flickereffects or background display errors in button objects.

NOTE:  anyway users can enable gradient in theme files and could override this setting.
Now here it is globally disabled for footers. If it works right,
it will be enabled in future.
2016-11-28 21:44:05 +01:00
Thilo Graf
696989dcf1 CComponentsFooter: add parameter for frame width for selected buttons
Frame width was hard coded.
2016-11-20 01:33:57 +01:00
Thilo Graf
55ac581523 CComponentsFooter: optimize select buttons, try to assign better contrast
Now it's possible to set parameters for frames and text.
Parameters are prdefined for better contrasts in select or default mode.

TODO: background modes have no effects at the moment. Here are other things need to be done.
2016-10-24 10:31:28 +02:00
Thilo Graf
542de648f5 CComponentsFooter: reduce button height inside footer
TODO: more optimization seems required
2016-10-24 10:31:27 +02:00
Thilo Graf
b3e7e49592 CComponentsFooter: use different select color for button, if count = 1
TODO: 	should be configurable. Not all theme color combinations
	have matched contrasts.
2016-10-24 10:31:26 +02:00
Thilo Graf
ebf2e65b38 CComponentsFooter: remove debug spam 2016-10-24 10:31:26 +02:00
Thilo Graf
e2a1e7dc5b cc_frm_button.cpp/cc_frm_footer.cpp: fix passed parameter
were not passed through
2016-10-24 10:31:25 +02:00
Thilo Graf
2e631fd0ce Try to rework footer
* try to fix enableButtonShadow(), seems an init is missing
* shadow fixed
2016-10-24 10:31:25 +02:00
Thilo Graf
363cf101d1 CComponentsFooter: add member enableButtonShadow()
Possibility to pass button properties into button objects
2016-10-24 10:31:25 +02:00
Thilo Graf
779c51bd00 CComponentsFooter: reduced button height for better optical view into footer 2016-10-24 10:31:25 +02:00
Thilo Graf
be740c1552 CMsgBox: add option to enable/disable button background
replaces var name btn_contour for better plausibility
2016-10-24 10:31:24 +02:00
Thilo Graf
dde298b1b7 CMsgBox: rework msgbox classes with Window class implementation
Replacing messagebox, hintbox_ext and some derivated parts with
basic class hintbox and derivated class CMsgBox. This should unify
window handling and avoids maintain of multiple classes with quasi
same purpose and adds more functionality.

TODO: fix and optimize details
2016-10-24 10:31:24 +02:00
svenhoefer
104d21e784 - rename customcolor.h -> color_custom.h; reduce unneeded inludes 2016-10-10 14:19:55 +02:00
svenhoefer
75fe6e407d - colors: add COL_FRAME wrapper 2016-10-10 14:19:54 +02:00
Thilo Graf
3af698701b CComponentsFooter: remove defined font from footer
cch_font has nothing to do with button font and is already
inherited and defined from header class and can be redefined with
setCaptionFont() methode if required.
2016-09-24 01:08:08 +02:00
Thilo Graf
2de3a167e5 CComponentsFooter: rename var for btn icon
is more plausible
2016-09-13 09:04:53 +02:00
Thilo Graf
9b9a8d1a78 CComponentsFooter: don't use default parameters for privat member
Passed init values are better to see here.
This should fix wrong footer color too. See UPNP-Browser, color was not
applied here.
2016-08-23 16:00:48 +02:00
Thilo Graf
a92757697f CComponentsFooter: use background color of footer inside chain object
Ensure pass of bg color from parent into chain object and button objects.
Required by embedded button objects. This prevents "holes" on screen.
2016-08-22 21:15:28 +02:00
svenhoefer
54f2ac510f - fonts: add and use own font for all footers 2016-08-15 19:02:42 +02:00
svenhoefer
13966c519b - cc_frm_footer: overload font option with old familiar font 2016-08-14 22:17:59 +02:00
svenhoefer
bc39d1e14e - colors: some internal renamings
* INFOBAR_SHADOW to SHADOW because it's not only used in infoviewer
* INFOBAR_SHADOW_TEXT to MENUFOOT_TEXT because it's the proper name

This is in preparation to make footer colors configurable
2016-08-14 21:55:18 +02:00
Thilo Graf
95885c4f6e CComponentsButton: use full height if no frame available 2016-03-17 09:14:50 +01:00
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
Thilo Graf
5de4b48a00 CComponentsFooter: reduce scale factor without button background 2015-07-01 16:05:42 +02:00
svenhoefer
5599784642 - cc_frm_footer: prepare for c2c gradient 2015-05-04 09:41:41 +02:00