Jan Körner
|
PtProgress widgets has wrong border color
|
Jan Körner
07/01/2014 6:58 AM
post110901
|
PtProgress widgets has wrong border color
Hi,
I have a PtOSCOntainer widget with blue fill color. As its child I have PtMTrend widget which has black fill color by
default. On top of that (empty) trend widget, I have a PtProgress widget. The colors for Pt_ARG_PROGRESS_BAR_COLOR and
Pt_ARG_FILL_COLOR are set correctly and appear as wished, but there still is a blue border around the progress bar
widget. This blue border cannot be changed by setting Pt_ARG_BORDER_COLOR.
Which arguments do I have to set in order to either erase this wrong border or at least change its color?
Regards,
Jan
|
|
|
Oleg Bolshakov
|
Re: PtProgress widgets has wrong border color
|
Oleg Bolshakov
07/02/2014 4:22 AM
post110907
|
Re: PtProgress widgets has wrong border color
Hi Jan,
To disable border of PtProgress widget you have to set Pt_HIGHLIGHT to Pt_FALSE.
Respectfully,
Oleg
01 июля 2014 г., в 14:58:55, Jan Körner <community-noreply@qnx.com> написал:
> Hi,
>
> I have a PtOSCOntainer widget with blue fill color. As its child I have PtMTrend widget which has black fill color by
default. On top of that (empty) trend widget, I have a PtProgress widget. The colors for Pt_ARG_PROGRESS_BAR_COLOR and
Pt_ARG_FILL_COLOR are set correctly and appear as wished, but there still is a blue border around the progress bar
widget. This blue border cannot be changed by setting Pt_ARG_BORDER_COLOR.
> Which arguments do I have to set in order to either erase this wrong border or at least change its color?
>
> Regards,
> Jan
>
>
>
> _______________________________________________
>
> Photon microGUI
> http://community.qnx.com/sf/go/post110901
> To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com
|
|
|
Jan Körner
|
Re: PtProgress widgets has wrong border color
|
Jan Körner
07/08/2014 8:43 AM
post110972
|
Re: PtProgress widgets has wrong border color
Hi Oleg,
thank you for that suggestion. Unfortunately, it does not work for me.
The Pt_HIGHLIGHTED entry of Pt_ARG_FLAGS is already set to 0 by default. Even if I reset it, the appearance does not
change.
I only can change the border by changing Pt_ARG_HIGHLIGHT_ROUNDNESS to > 0. That makes the green Pt_ARG_INLINE_COLOR
line to have round corners and the blue border is not visible anymore. Perhaps the green inline overlaps the blue border
in this case.
Regards,
Jan
|
|
|
Oleg Bolshakov
|
Re: PtProgress widgets has wrong border color
|
Oleg Bolshakov
07/09/2014 6:47 AM
post110990
|
Re: PtProgress widgets has wrong border color
Hi Jan,
What version of QNX do you use? Can you send me a minimal source to reproduce your issue?
Respectfully,
Oleg
08 июля 2014 г., в 16:43:59, Jan Körner <community-noreply@qnx.com> написал:
> Hi Oleg,
>
> thank you for that suggestion. Unfortunately, it does not work for me.
>
> The Pt_HIGHLIGHTED entry of Pt_ARG_FLAGS is already set to 0 by default. Even if I reset it, the appearance does not
change.
>
> I only can change the border by changing Pt_ARG_HIGHLIGHT_ROUNDNESS to > 0. That makes the green Pt_ARG_INLINE_COLOR
line to have round corners and the blue border is not visible anymore. Perhaps the green inline overlaps the blue border
in this case.
>
>
>
> Regards,
> Jan
>
>
>
> _______________________________________________
>
> Photon microGUI
> http://community.qnx.com/sf/go/post110972
> To cancel your subscription to this discussion, please e-mail photon-graphics-unsubscribe@community.qnx.com
|
|
|
Jan Körner
|
Re: PtProgress widgets has wrong border color
|
Jan Körner
07/09/2014 7:39 AM
post110991
|
Re: PtProgress widgets has wrong border color
Hi Oleg,
I use QNX 6.5.
Here are is (a part of) my code:
PtWidget_t* m_root, m_container, m_trend, m_cardio, m_progress
m_root = PtCreateWidget(PtWindow, Pt_NO_PARENT, 0, NULL);
PtSetResource(m_root, Pt_ARG_MARGIN_HEIGHT, 0, 0);
PtSetResource(m_root, Pt_ARG_MARGIN_WIDTH, 0, 0);
const PhArea_t areaRoot = {{0, 0}, {640, 480}};
PtSetResource(m_root, Pt_ARG_AREA, reinterpret_cast<long>(&areaRoot), 0);
PtRealizeWidget(m_root);
m_container = PtCreateWidget(PtOSContainer, m_root, 0, NULL);
PtSetResource(m_container, Pt_ARG_MARGIN_HEIGHT, 0, 0);
PtSetResource(m_container, Pt_ARG_MARGIN_WIDTH, 0, 0);
const PhArea_t areaCont = {{0, 0}, {640, 480}};
PtSetResource(m_container, Pt_ARG_AREA, reinterpret_cast<long>(&areaCont), 0);
PtSetResource(m_container, Pt_ARG_FILL_COLOR, Pg_BLUE, 0);
PtRealizeWidget(m_container);
m_trend= PtCreateWidget(PtLabel, m_container, 0, NULL);
PtSetResource(m_trend, Pt_ARG_MARGIN_HEIGHT, 0, 0);
PtSetResource(m_trend, Pt_ARG_MARGIN_WIDTH, 0, 0);
const PhArea_t areaTrend = {{0, 50}, {640, 200}};
PtSetResource(m_trend, Pt_ARG_AREA, reinterpret_cast<long>(&areaTrend), 0);
PtSetResource(m_trend, Pt_ARG_FILL_COLOR, Pg_BLACK, 0);
PtRealizeWidget(m_trend);
m_cardio= PtCreateWidget(PtMTrend, m_container, 0, NULL);
PtSetResource(m_cardio, Pt_ARG_MARGIN_HEIGHT, 0, 0);
PtSetResource(m_cardio, Pt_ARG_MARGIN_WIDTH, 0, 0);
const PhArea_t areaCardio = {{0, 50}, {600, 200}};
PtSetResource(m_cardio, Pt_ARG_AREA, reinterpret_cast<long>(&areaCardio), 0);
PtRealizeWidget(m_cardio);
m_progress= PtCreateWidget(PtProgress, m_container, 0, NULL);
PtSetResource(m_progress, Pt_ARG_MARGIN_HEIGHT, 0, 0);
PtSetResource(m_progress, Pt_ARG_MARGIN_WIDTH, 0, 0);
PtSetResource(m_progress, Pt_ARG_HORIZONTAL_ALIGNMENT, Pt_LEFT, 0);
PtSetResource(m_progress, Pt_ARG_VERTICAL_ALIGNMENT, Pt_TOP, 0);
PtSetResource(m_progress, Pt_ARG_PROGRESS_BAR_COLOR, Pg_GREEN, 0);
PtSetResource(m_progress, Pt_ARG_FILL_COLOR, Pg_BLACK, 0);
const PhArea_t areaProg = {{200, 100}, {200, 50}};
PtSetResource(m_progress, Pt_ARG_AREA, reinterpret_cast<long>(&areaProg ), 0);
PtRealizeWidget(m_progress);
Regards,
Jan
|
|
|
Oleg Bolshakov
|
Re: PtProgress widgets has wrong border color
|
Oleg Bolshakov
07/11/2014 6:55 AM
post111032
|
Re: PtProgress widgets has wrong border color
Hi Jan,
Here is a modified source. String marked "border will be hidden" disables a border.
int main( ) {
PtWidget_t *m_root, *m_container, *m_trend, *m_cardio, *m_progress;
m_root = PtCreateWidget( PtWindow, Pt_NO_PARENT, 0, NULL);
PtSetResource( m_root, Pt_ARG_MARGIN_HEIGHT, 0, 0);
PtSetResource( m_root, Pt_ARG_MARGIN_WIDTH, 0, 0);
const PhArea_t areaRoot = {{0, 0}, {640, 480}};
PtSetResource( m_root, Pt_ARG_AREA, (long)(&areaRoot), 0);
PtRealizeWidget(m_root);
m_container = PtCreateWidget(PtOSContainer, m_root, 0, NULL);
PtSetResource(m_container, Pt_ARG_MARGIN_HEIGHT, 0, 0);
PtSetResource(m_container, Pt_ARG_MARGIN_WIDTH, 0, 0);
const PhArea_t areaCont = {{0, 0}, {640, 480}};
PtSetResource(m_container, Pt_ARG_AREA, (long)(&areaCont), 0);
PtSetResource(m_container, Pt_ARG_FILL_COLOR, Pg_BLUE, 0);
PtRealizeWidget(m_container);
m_trend= PtCreateWidget(PtLabel, m_container, 0, NULL);
PtSetResource(m_trend, Pt_ARG_MARGIN_HEIGHT, 0, 0);
PtSetResource(m_trend, Pt_ARG_MARGIN_WIDTH, 0, 0);
const PhArea_t areaTrend = {{0, 50}, {640, 200}};
PtSetResource(m_trend, Pt_ARG_AREA, (long)(&areaTrend), 0);
PtSetResource(m_trend, Pt_ARG_FILL_COLOR, Pg_BLACK, 0);
PtRealizeWidget(m_trend);
m_cardio= PtCreateWidget(PtMTrend, m_container, 0, NULL);
PtSetResource(m_cardio, Pt_ARG_MARGIN_HEIGHT, 0, 0);
PtSetResource(m_cardio, Pt_ARG_MARGIN_WIDTH, 0, 0);
const PhArea_t areaCardio = {{0, 50}, {600, 200}};
PtSetResource(m_cardio, Pt_ARG_AREA, (long)(&areaCardio), 0);
PtRealizeWidget(m_cardio);
m_progress= PtCreateWidget(PtProgress, m_container, 0, NULL);
PtSetResource(m_progress, Pt_ARG_MARGIN_HEIGHT, 0, 0);
PtSetResource(m_progress, Pt_ARG_MARGIN_WIDTH, 0, 0);
PtSetResource(m_progress, Pt_ARG_HORIZONTAL_ALIGNMENT, Pt_LEFT, 0);
PtSetResource(m_progress, Pt_ARG_VERTICAL_ALIGNMENT, Pt_TOP, 0);
PtSetResource(m_progress, Pt_ARG_PROGRESS_BAR_COLOR, Pg_GREEN, 0);
PtSetResource(m_progress, Pt_ARG_FILL_COLOR, Pg_BLACK, 0);
const PhArea_t areaProg = {{200, 100}, {200, 50}};
PtSetResource(m_progress, Pt_ARG_AREA, (long)(&areaProg ), 0);
PtSetResource( m_progress, Pt_ARG_FLAGS, Pt_FALSE, Pt_HIGHLIGHTED ); // border will be hidden
PtRealizeWidget(m_progress);
return( Pt_CONTINUE );
}
Respectfully,
Oleg
09 июля 2014 г., в 15:39:02, Jan Körner <community-noreply@qnx.com> написал:
> Hi Oleg,
>
> I use QNX 6.5.
>
> Here are is (a part of) my code:
>
> PtWidget_t* m_root, m_container, m_trend, m_cardio, m_progress
>
> m_root = PtCreateWidget(PtWindow, Pt_NO_PARENT, 0, NULL);
> PtSetResource(m_root, Pt_ARG_MARGIN_HEIGHT, 0, 0);
> PtSetResource(m_root, Pt_ARG_MARGIN_WIDTH, 0, 0);
> const PhArea_t areaRoot = {{0, 0}, {640, 480}};
> PtSetResource(m_root, Pt_ARG_AREA, reinterpret_cast<long>(&areaRoot), 0);
> PtRealizeWidget(m_root);
>
> m_container = PtCreateWidget(PtOSContainer, m_root, 0, NULL);
> PtSetResource(m_container, Pt_ARG_MARGIN_HEIGHT, 0, 0);
> PtSetResource(m_container, Pt_ARG_MARGIN_WIDTH, 0, 0);
> const PhArea_t areaCont = {{0, 0}, {640, 480}};
> PtSetResource(m_container, Pt_ARG_AREA, reinterpret_cast<long>(&areaCont), 0);
> PtSetResource(m_container, Pt_ARG_FILL_COLOR, Pg_BLUE, 0);
> PtRealizeWidget(m_container);
>
> m_trend= PtCreateWidget(PtLabel, m_container, 0, NULL);
> PtSetResource(m_trend, Pt_ARG_MARGIN_HEIGHT, 0, 0);
> PtSetResource(m_trend, Pt_ARG_MARGIN_WIDTH, 0, 0);
> const PhArea_t areaTrend = {{0, 50}, {640, 200}};
> PtSetResource(m_trend, Pt_ARG_AREA, reinterpret_cast<long>(&areaTrend), 0);
> PtSetResource(m_trend, Pt_ARG_FILL_COLOR, Pg_BLACK, 0);
> PtRealizeWidget(m_trend);
>
> m_cardio= PtCreateWidget(PtMTrend, m_container, 0, NULL);
> PtSetResource(m_cardio, Pt_ARG_MARGIN_HEIGHT, 0, 0);
> PtSetResource(m_cardio, Pt_ARG_MARGIN_WIDTH, 0,...
View Full Message
|
|
|
|