void TabView::Draw(BRect updateRect) { BRect frame(fLayoutItem->Frame()); if (fIsFront) { // Extend the front tab outward left/right in order to merge // the frames of adjacent tabs. if (!fIsFirst) frame.left--; if (!fIsLast) frame.right++; frame.bottom++; } DrawBackground(fContainerView, frame, updateRect, fIsFirst, fIsLast, fIsFront); if (fIsFront) { frame.top += 3.0f; if (!fIsFirst) frame.left++; if (!fIsLast) frame.right--; } else frame.top += 6.0f; float spacing = be_control_look->DefaultLabelSpacing(); frame.InsetBy(spacing, spacing / 2); DrawContents(fContainerView, frame, updateRect, fIsFirst, fIsLast, fIsFront); }
//---------------------------- virtual void Draw() const{ super::Draw(); app.DrawFormattedText(tdi); if(tdi.body_w.Length()) app.DrawThickSeparator(rc.x+app.fdb.cell_size_x*3, rc.sx-app.fdb.cell_size_x*6, list.rc.y-app.fdb.line_spacing/2); DrawContents(); }
void NowPlayingWidget::paintEvent(QPaintEvent* e) { QPainter p(this); DrawContents(&p); // Draw the previous track's image if we're fading if (!previous_track_.isNull()) { p.setOpacity(previous_track_opacity_); p.drawPixmap(0, 0, previous_track_); } }
void C_mode_configuration::Draw() const{ app.DrawTitleBar(app.GetText(title_text_id), rc.y); app.ClearSoftButtonsArea(); DrawContents(); const S_config_item &ec = options[selection]; app.DrawSoftButtonsBar(*this, GetLeftSoftKey(ec), GetRightSoftKey(ec), text_editor); app.SetScreenDirty(); }
BOOLEAN NDAAction(EventRecord *sysEvent, int code) { int event; static EventRecord localEvent; unsigned int eventCode; BOOLEAN result = FALSE; switch (code) { case runAction: return result; case eventAction: BlockMove((Pointer)sysEvent, (Pointer)&localEvent, 16); localEvent.wmTaskMask = 0x001FFFFF; eventCode = TaskMasterDA(0, &localEvent); switch(eventCode) { case updateEvt: BeginUpdate(gCalcWinPtr); DrawContents(); EndUpdate(gCalcWinPtr); break; case wInControl: HandleControl(&localEvent); break; case keyDownEvt: case autoKeyEvt: HandleKey(&localEvent); break; } break; case cutAction: case copyAction: case pasteAction: case clearAction: result = TRUE; HandleMenu(code); break; } return result; }
void NowPlayingWidget::SetImage(const QImage& image) { if (visible_) { // Cache the current pixmap so we can fade between them previous_track_ = QPixmap(size()); previous_track_.fill(palette().background().color()); previous_track_opacity_ = 1.0; QPainter p(&previous_track_); DrawContents(&p); p.end(); } original_ = image; UpdateDetailsText(); ScaleCover(); SetVisible(true); // Were we waiting for this cover to load before we started fading? if (!previous_track_.isNull()) { fade_animation_->start(); } }