GUIslice icon indicating copy to clipboard operation
GUIslice copied to clipboard

XSlider uses frame glow color when selected instead of glow color.

Open Pconti31 opened this issue 2 years ago • 0 comments

Testing XSlider with themes shows that the current XSlider is incorrectly using frame glow color from the
gslc_ElemCalcRectState() routine when drawing the track.

inside gslc_ElemCalcRectState() 
// Calculate the element colors
  pState->colBack = pElem->colElemFill;
  if (bGlowing) {
    pState->colFrm = pElem->colElemFrameGlow;
    pState->colInner = pElem->colElemFillGlow; <-- maybe use this instead???
    pState->colTxtFore = pElem->colElemTextGlow;
  } else {
    pState->colFrm = pElem->colElemFrame;
    pState->colInner = pElem->colElemFill;
    pState->colTxtFore = pElem->colElemText;
  }

inside XSlider Draw
    // Make the track highlight during glow
    gslc_DrawLine(pGui,nX0+nMargin,nYMid,nX1-nMargin,nYMid,sState.colFrm);

Note that the builder currently doesn't even ask for frame glow colors on any elements although that could change in the future.

One more issue when touching the slider a large black box is briefly shown to refresh the controls. Might be nicer if we had a way to set the color beside you using the background since in many cases we have an enclosing box for our controls with a different color than the background. Paul--

Pconti31 avatar Apr 17 '22 17:04 Pconti31