mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-18 19:50:46 +00:00
Trying a solid background to improve Mac scroll issues
This commit is contained in:
parent
7c4d4693d9
commit
8de6d63be5
@ -828,17 +828,30 @@ void gGraphWindow::resizeGL(int w, int h)
|
||||
void gGraphWindow::Render(int w, int h)
|
||||
{
|
||||
if (m_gradient_background) {
|
||||
glClearColor(255,255,255,255);
|
||||
//glClearDepth(1);
|
||||
glClear(GL_COLOR_BUFFER_BIT);// | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
//glEnable(GL_BLEND);
|
||||
//glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
glBegin(GL_QUADS);
|
||||
glColor4f(1.0,1.0,1.0,.5); // Gradient start
|
||||
glColor4f(1.0,1.0,1.0,1.0); // Gradient start
|
||||
glVertex2f(0, h);
|
||||
glVertex2f(0, 0);
|
||||
|
||||
glColor4f(0.8,0.8,1.0,.5); // Gradient End
|
||||
glColor4f(0.8,0.8,1.0,1.0); // Gradient End
|
||||
glVertex2f(w, 0);
|
||||
glVertex2f(w, h);
|
||||
|
||||
/*glColor4f(1.0,1.0,1.0,0.5); // Gradient start
|
||||
glVertex2f(GetLeftMargin(), h-GetTopMargin());
|
||||
glVertex2f(GetLeftMargin(), GetBottomMargin());
|
||||
glVertex2f(w-GetRightMargin(), GetBottomMargin());
|
||||
glVertex2f(w-GetRightMargin(), h-GetTopMargin()); */
|
||||
glEnd();
|
||||
//glDisable(GL_BLEND);
|
||||
} else {
|
||||
glClearColor(255,255,255,0);
|
||||
glClearColor(255,255,255,255);
|
||||
glClearDepth(1);
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ MyScrollArea::~MyScrollArea()
|
||||
void MyScrollArea::scrollContentsBy(int dx, int dy)
|
||||
{
|
||||
QScrollArea::scrollContentsBy(dx,dy);
|
||||
|
||||
// m_daily->RedrawGraphs();
|
||||
#ifdef Q_WS_MAC
|
||||
if (timer->isActive()) timer->stop();
|
||||
timer->setSingleShot(true);
|
||||
|
BIN
docs/0.0.gif
BIN
docs/0.0.gif
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 10 KiB |
Loading…
Reference in New Issue
Block a user