Skip to content
This repository has been archived by the owner. It is now read-only.

AB2-772 Merging Fennec 65.0 #611

Merged
merged 14 commits into from Feb 1, 2019

Small fixes, problems discovered while compiling

  • Loading branch information
spacifici committed Feb 1, 2019
commit f638c736656e56d9545490f3f0a262cdf172ca81
@@ -119,7 +119,7 @@
<style name="UrlBar.Base.MenuItem" />

<style name="UrlBar.V15.MenuItem" parent="UrlBar.Base.MenuItem">
<!-- Cliqz start ->
<!-- Cliqz start -->
<item name="android:layout_toLeftOf">@id/ghosty</item>
<!-- Cliqz end -->
</style>
@@ -77,11 +77,7 @@ private State loadDefaultConfig() {
/* Cliqz start */
// add Offrz panel, change panels order to be TopSites, history, MyOffrz, bookmarks
panelConfigs.add(createBuiltinPanelConfig(mContext, PanelType.COMBINED_HISTORY));
if (BuildConfig.FLAVOR_skin.equals("bond")) {
panelConfigs.add(createBuiltinPanelConfig(mContext, PanelType.MY_OFFRZ, EnumSet.of(PanelConfig.Flags.DISABLED_PANEL)));
} else {
panelConfigs.add(createBuiltinPanelConfig(mContext, PanelType.MY_OFFRZ));
}
panelConfigs.add(createBuiltinPanelConfig(mContext, PanelType.MY_OFFRZ));
panelConfigs.add(createBuiltinPanelConfig(mContext, PanelType.BOOKMARKS));
/* Cliqz end */

@@ -104,7 +104,7 @@

private final ThemedTextView mTitle;
private final ThemedLinearLayout mThemeBackground;
/* Cliqz start */
/* Cliqz start */
// add padding left and rename padding to padding right
private final int mTitlePaddingRight;
private final int mTitlePaddingLeft;
@@ -124,7 +124,7 @@
private final SiteIdentityPopup mSiteIdentityPopup;
private int mSecurityImageLevel;

/* Cliqz start o/
/* Cliqz start o/
// remove spans colors
private final ForegroundColorSpan mUrlColorSpan;
private final ForegroundColorSpan mPrivateUrlColorSpan;
@@ -409,6 +409,7 @@ private void updateSiteIdentity(@NonNull Tab tab) {
updatePageActions();
}
}

/* Cliqz start o/
// stop scrolling title, it ellipses form the end.
private void scrollTitle() {
@@ -512,6 +513,30 @@ private void updatePageActions() {
/* Cliqz end */
}

/* Cliqz start */
// update TitleBar width depend on displayed icons
void updateTitleBarWidth() {
final Resources resources = getContext().getResources();
final WindowManager wm = (WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE);
final DisplayMetrics metrics = new DisplayMetrics();
if (wm != null) {
wm.getDefaultDisplay().getMetrics(metrics);
}
final int buttonWidth = (int) resources.getDimension(R.dimen.page_action_button_width);

post(new Runnable() {
@Override
public void run() {
final int actionsLayoutWidth = mPageActionLayout.getPageActionListSize() * buttonWidth;
final int titleBarWidth = mThemeBackground.getWidth() +
(int) resources.getDimension(R.dimen.myoffrz_padding_8) -
mSiteSecurity.getWidth() - actionsLayoutWidth;
mTitle.setWidth(titleBarWidth);
}
});
}
/* Cliqz end */

List<? extends View> getFocusOrder() {
return Arrays.asList(mSiteSecurity, mPageActionLayout, mStop);
}
ProTip! Use n and p to navigate between commits in a pull request.