Commit Graph

63 Commits

Author SHA1 Message Date
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
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
a5d2c2cb1d CComponentsButton: try to fix fallback for font size
Some conditions were not catched.
2017-01-05 22:19:18 +01:00
Thilo Graf
4a03eb6980 CComponentsButton: fix height comparsion
comparsion with itself
2017-01-05 22:19:18 +01:00
Thilo Graf
b335408913 CComponentsButton: try to fix font size in buttons
Some text in button chains had different font sizes. To see in some
Messageboxes.
2016-12-30 20:33:26 +01:00
Thilo Graf
2889fbd70d CComponentsButton: rename cc_btn_capt -> cc_btn_text
More plausible
2016-12-30 20:33:26 +01:00
Thilo Graf
ce11a3a0df CComponentsButton: remake caption size to 85% of button height
Better optical matching size.
2016-10-24 10:31:26 +02:00
Thilo Graf
03d010fa29 CComponentsButton: remove enableShadow() from button class
is not required
2016-10-24 10:31:26 +02:00
Thilo Graf
0f6e8e1f5d CComponentsButton: remove clear()-methode and initVarButton()
clear() killed all button object with all key values and key properties.
So return values of messeage objects was killed.

initVarButton() contains Oobjekt intits to already existant object.
Bad idea, if we init again or pre init with NULL.

Mode pass was missed.
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
3477e28cd7 CComponentsItem: fix changeing color on select switching of frames
expand select mode methodes with paremters for frame properties
This should make variables col_frame_sel and fr_thickness_sel superfluous.
2016-10-24 10:31:25 +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
5d450c60d3 - rename SHADOW_OFFSET -> OFFSET_SHADOW 2016-10-10 14:19:55 +02:00
Thilo Graf
7c4e1c20b8 CComponentsButton: use passed shadow parameter
Shadow was always enabled.
2016-09-24 01:09:46 +02:00
Thilo Graf
2cf409bc27 CComponentsButton: reduce shadow width
buttons are mostly small elements, so these elements should have a reasonable shadow width
2016-08-22 21:16:54 +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
svenhoefer
fa27f87bb1 - cc_frm_button: don't use frames per default and align fontsize
to familiar size
2016-08-14 20:56:41 +02:00
Thilo Graf
95e9ca5de8 CComponentsButton: get image path from framebuffer
Buttons didn't get icons from custom path e.g. /var/tuxbox/icons
This should fix this.
2016-03-17 10:30:47 +01:00
Thilo Graf
7197f51e89 CComponentsButton: fix button icon position on dynamic changed conditions
In some constellations it is possible, that costum icons with
other dimensions will be not correct positionized. This should
fix this issue.

This reverts partial commit 8e0d1c85f9.
2016-03-17 09:12:43 +01:00
Thilo Graf
8e0d1c85f9 CComponentsButton: increase default height of buttons 2016-02-29 10:38:55 +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
ff97b7d25f CComponentsButton: fix transparecny of button icon
Background was black for some icons
2016-01-05 15:06:18 +01:00
Thilo Graf
eec34222ea CComponentsButton: remove current gradient from all buttons
This will comming soon, gradient is prepared for use but disabled at
the moment till some other parts of gui parts are provide gradient
2016-01-05 15:06:18 +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
b47a0ccaeb CComponentsButton: simplify paint of button icon
Calculation of image aspect ratio now happens in picture object itself.
2015-07-17 15:35:47 +02:00
Thilo Graf
cabe84bf0f CComponentsButton: fix image scale
Wrong ratio calculation.
2015-07-01 16:05:38 +02:00
svenhoefer
e85f32848c - ccomponents: add missing slash to iconBasePath 2015-05-07 11:10:28 +02:00
Thilo Graf
47b37d4405 CComponentsButton: disable gradient
Not necessary as long not all or most gui buttons can provide gradient
2015-03-29 22:40:15 +02:00
Thilo Graf
d33c4911d2 CComponentsButton: fix fit of button icon
Scale was broken
2015-03-29 22:40:08 +02:00
Thilo Graf
66e5f03c92 CComponentsButton: use unified body colors in gradient mode
Some theme controlled colors don't really looks nice in some
combinations with window backgrounds.
2015-03-29 22:39:54 +02:00
Thilo Graf
04083bc299 CComponentsButton: use of global button text color
Used text color was different to old button handler.
2015-03-29 22:39:52 +02:00
Thilo Graf
f7faf07ab1 CComponentsForm: fix item offset with enabled frame
frame width was not considered
2015-03-29 22:39:50 +02:00
[CST] Focus
fdd5486714 gui/components/cc_frm_button.cpp: set CTextBox save screen flag 2015-03-06 14:13:59 +03:00
Thilo Graf
de2aebcebc CComponentsButton: apply color gradiant to buttons 2014-09-25 11:08:16 +04:00
Thilo Graf
706ed0f31f CComponentsButton: add extended properties for button objects
Allows to assign values for events, msg, results. So it is possible
to evaluate/use these properties eg. directly in exec routines.
2014-09-25 11:02:22 +04:00
Thilo Graf
5eb63b9515 CComponentsPicture: structure of class highly simplified
It should  be now easier to use images as objects. An initialized
picture object should provide all relevant properties and some
functionalities of picture viewer.
2014-06-23 18:43:47 +02:00
svenhoefer
8b91cda918 - change getRenderWidth() default to UTF8 2014-06-11 23:07:00 +02:00
Thilo Graf
9c4aadd2bf CComponentsButton: use y position 0 for general alignment 2014-05-22 21:50:50 +02:00
Thilo Graf
9d014d2039 CComponentsButton: ensure matching icons inside button
Some icons can be too large for defined button height, so it's required to
scale icons. Scaling happens inside cc_btn_icon_obj during its init.
2014-05-22 21:50:49 +02:00
Thilo Graf
75bf3aa276 CComponentsButton: remove additonal y offset
Any other offset could have bad side effects for centered text,
it must be centered here. Other font sizes can make problems here.
2014-05-22 21:50:49 +02:00
Thilo Graf
2c87bb750a CComponentsButton: add class with const char* parameters for icon names 2014-05-22 21:50:47 +02:00
Thilo Graf
95c7e44eb1 CComponentsButton: ignonre objects if no inititalized
This makes it possible to use buttons with or without icons or text
2014-05-22 21:50:46 +02:00
Thilo Graf
9ffdb1cb98 CComponentsButton, CComponentsFooter: rework bestfit of buttons inside chain 2014-05-22 21:50:45 +02:00
Thilo Graf
419fc12f2e CComponentsButton: add possibility to change font type, whitespace fixes 2014-05-22 21:50:44 +02:00
Thilo Graf
7b279ddd33 CComponentsButton: simplify handling of init of buttons with chain class 2014-05-22 21:50:43 +02: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
M. Liebmann
c4bff391a5 CComponentsButton: Incrase height for btn font 2014-02-21 00:02:46 +01:00
Thilo Graf
9ac35f0d92 CComponentsButton: reduce scope of variable face_x
The scope of the variable 'face_x' can be reduced. (style)
2013-12-25 19:50:31 +01:00