This is a form of metonymy using adjectives as what are called transferred epithets.
Nordquist, in Grammar.about.com gives a good overview, including the definition
A figure of speech in which an epithet (or adjective) grammatically
qualifies a noun other than the person or thing it is actually
describing. Also known in rhetoric as hypallage.
There needs to be some connection between the adjective and the rest of the statement.
He adds
A transferred epithet often involves shifting a modifier from the
animate to the inanimate, as in the phrases "cheerful money,"
"sleepless night," and "suicidal sky."
'A quiet pint' (the surroundings are quiet) and 'a proud day' (some of the principals at the ceremony etc are fittingly proud) are other commonly used examples.
Gandalf's critical analysis of Bilbo's 'Good morning!'/s [Goodreads] (or Bilbo's acquiescence) is partly based on transference.
Wikipedia sees the sense in including similar noun phrases employing attributive nouns rather than adjectives as premodifiers in the class:
Hypallage ... is a figure of speech in which the syntactic
relationship between two terms is interchanged, or—more frequently—a modifier is syntactically linked to an item other than the one that
it modifies semantically
(but note that 'hypallage' is not restricted to the 'transferred epithet' sense);
salad days and landscape photography are examples.
.................
A complication is that dictionary compilers rightly pick up on the non-central usages as they become idiomatic, and (rightly or wrongly) add secondary denotations (as opposed to say listing such usages under 'idioms'. For example, a possibility is
'proud' as in 'proud day': 'used to describe a time, event etc when there was/is ... reasonable grounds for pride in someone's or some group's accomplishments / when there was/is ... such pride'. It can then be argued that the defined subsense is no longer a transferred sense.