Wetting represents one of the most fundamental features of water interactions with a surface, resulting from interplay between cohesive and adhesive molecular forces. The wettability of a surface by a liquid is characterized by the contact angle of the liquid on that surface, which is also given by the well-known Young equation. At nanoscale, however, additional contributions enter the play and challenge the validity of the Young equation. We perform all-atom simulations of small water droplets and water films on flat surfaces with tunable polarities. The outcomes provide important insight into the relation between the surface chemistry and wettability, and imply the concept of generalized line tension. The latter stems from the three-phase contact line and represents a critical player in the stability of small droplets and liquid deposits in various contexts.