~unity-team/oxide/locationBarHeightOnScreenChange

« back to all changes in this revision

Viewing changes to qt/core/browser/oxide_qt_web_view.cc

  • Committer: Gerry Boland
  • Date: 2016-04-28 14:40:39 UTC
  • Revision ID: gerry.boland@canonical.com-20160428144039-vbbqum5za738dixn
On screen scale change, need to recalculate the height of the location bar in terms of the new scale

Show diffs side-by-side

added added

removed removed

Lines of Context:
249
249
    : contents_view_(new ContentsView(view_client, handle)),
250
250
      client_(client),
251
251
      security_status_(security_status),
 
252
      location_bar_height_(0),
252
253
      frame_tree_torn_down_(false) {
253
254
  DCHECK(client);
254
255
  DCHECK(handle);
946
947
}
947
948
 
948
949
int WebView::locationBarHeight() const {
949
 
  return DpiUtils::ConvertChromiumPixelsToQt(
950
 
      web_view_->GetLocationBarHeight(), contents_view_->GetScreen());
 
950
  return location_bar_height_;
951
951
}
952
952
 
953
953
void WebView::setLocationBarHeight(int height) {
956
956
                                          contents_view_->GetScreen()));
957
957
}
958
958
 
 
959
 // FIXME: called on screen change, to recalculate location bzr height if scale changed
 
960
void WebView::updateLocationBarHeight() const {
 
961
  setLocationBarHeight(location_bar_height_);
 
962
}
 
963
 
959
964
int WebView::locationBarOffset() const {
960
965
  return DpiUtils::ConvertChromiumPixelsToQt(
961
966
      web_view_->GetLocationBarOffset(), contents_view_->GetScreen());